projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
preload_images start added to first initializiation stream's data
[brisk.git]
/
web
/
Obj
/
sac-a-push.phh
diff --git
a/web/Obj/sac-a-push.phh
b/web/Obj/sac-a-push.phh
index
8f0dbc3
..
04f7c5b
100644
(file)
--- a/
web/Obj/sac-a-push.phh
+++ b/
web/Obj/sac-a-push.phh
@@
-305,7
+305,7
@@
class Sac_a_push {
}
$write = NULL;
$except = NULL;
}
$write = NULL;
$except = NULL;
- $num_changed_sockets = stream_select($read, $write, $except, 0,
1
00000);
+ $num_changed_sockets = stream_select($read, $write, $except, 0,
5
00000);
if ($num_changed_sockets == 0) {
printf(" no data in 5 secs ");
if ($num_changed_sockets == 0) {
printf(" no data in 5 secs ");
@@
-368,15
+368,18
@@
class Sac_a_push {
}
}
else {
}
}
else {
- if (($buf = fread($sock, 512)) === FALSE) {
- printf("error read\n");
- }
- else if (strlen($buf) === 0) {
+ $buf = fread($sock, 512);
+ if ($buf == FALSE || strlen($buf) == 0) {
+ if ($buf == FALSE) {
+ printf("ERROR READING\n");
+ }
if ($sock === $this->list) {
printf("Arrivati %d bytes da list\n", strlen($buf));
if ($sock === $this->list) {
printf("Arrivati %d bytes da list\n", strlen($buf));
+ exit(21);
}
else if ($sock === $this->in) {
printf("Arrivati %d bytes da stdin\n", strlen($buf));
}
else if ($sock === $this->in) {
printf("Arrivati %d bytes da stdin\n", strlen($buf));
+ exit(22);
}
else {
// $user_a[$s2u[intval($sock)]]->disable();
}
else {
// $user_a[$s2u[intval($sock)]]->disable();
@@
-385,9
+388,10
@@
class Sac_a_push {
}
unset($this->socks[intval($sock)]);
unset($this->s2u[intval($sock)]);
}
unset($this->socks[intval($sock)]);
unset($this->s2u[intval($sock)]);
- fclose($sock);
- printf("CLOSE ON READ\n");
}
}
+ fclose($sock);
+ printf("CLOSE ON READ\n");
+
if ($this->debug > 1) {
printf("post unset\n");
print_r($this->socks);
if ($this->debug > 1) {
printf("post unset\n");
print_r($this->socks);