From bb89ed5253c5199147d1109b7189ce3681242eae Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 8 Apr 2013 00:20:51 +0200 Subject: [PATCH] =?utf8?q?If=20accept()=20fails,=20do=20not=20take=20down?= =?utf8?q?=20the=20entire=20thing;=20it=20could=20be=20a=20transient=20err?= =?utf8?q?or=20like=20=E2=80=9Ctoo=20many=20open=20files=E2=80=9D.=20Inste?= =?utf8?q?ad,=20sleep=200.1=20seconds=20and=20try=20again.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- cubemap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cubemap.cpp b/cubemap.cpp index 9b98eba..008126c 100644 --- a/cubemap.cpp +++ b/cubemap.cpp @@ -90,7 +90,8 @@ void *acceptor_thread_run(void *arg) } if (sock == -1) { perror("accept"); - exit(1); + usleep(100000); + continue; } // Set the socket as nonblocking. -- 2.39.5