projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug for already closed readed socket
[brisk.git]
/
web
/
spush
/
brisk-spush.php
diff --git
a/web/spush/brisk-spush.php
b/web/spush/brisk-spush.php
index
9593450
..
a811a29
100755
(executable)
--- 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) {
}
/* 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);
if ($sock === $list) {
printf("NUOVA CONNEX\n");
$new_unix = stream_socket_accept($list);