X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fspush%2Fbrisk-spush.php;h=a811a2902f3283c58aa616cac8380084a405a4ca;hb=8c1df4ebf55f715144a422cdb4be7eee48f1b5d2;hp=95934501565457ddf1e101c22a8685887a5c2ff5;hpb=92c5ac9505608504a33b757a2f0f1c1a0fcd86ad;p=brisk.git diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index 9593450..a811a29 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -173,6 +173,11 @@ function main() } /* At least at one of the sockets something interesting happened */ foreach ($read as $i => $sock) { + /* is_resource check is required because there is the possibility that + during new request an old connection is closed */ + if (!is_resource($sock)) { + continue; + } if ($sock === $list) { printf("NUOVA CONNEX\n"); $new_unix = stream_socket_accept($list);