If accept() fails, do not take down the entire thing; it could be a transient error...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 7 Apr 2013 22:20:51 +0000 (00:20 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 7 Apr 2013 22:20:51 +0000 (00:20 +0200)
cubemap.cpp

index 9b98eba..008126c 100644 (file)
@@ -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.