stream_socket_accept return value verified
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Wed, 24 Oct 2012 05:31:52 +0000 (07:31 +0200)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Wed, 24 Oct 2012 05:31:52 +0000 (07:31 +0200)
web/Obj/sac-a-push.phh

index fa78539..8f0dbc3 100644 (file)
@@ -324,7 +324,10 @@ class Sac_a_push {
                     }
                     if ($sock === $this->list) {
                         printf("NUOVA CONNEX\n");
-                        $new_unix = stream_socket_accept($this->list);
+                        if (($new_unix = stream_socket_accept($this->list)) == FALSE) {
+                            printf("SOCKET_ACCEPT FAILED\n");
+                            continue;
+                        }
                         $stream_info = "";
                         $method      = "";
                         $get         = array();