]> git.sesse.net Git - cubemap/commitdiff
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 9b98ebab999fe6e0818528305df992c92b378f7e..008126c5c97273762b5144cf8a9d077efc940b5d 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.