projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fflush_mgmt' into curls
[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
6ed7a0e
..
e4e020d
100644
(file)
--- a/
web/Obj/sac-a-push.phh
+++ b/
web/Obj/sac-a-push.phh
@@
-874,6
+874,13
@@
class Sac_a_push {
$id = intval($sock);
if (isset($this->s2u[$id])) {
$user = $this->s2u[$id];
$id = intval($sock);
if (isset($this->s2u[$id])) {
$user = $this->s2u[$id];
+
+ if ($user->rd_toflush) {
+ if (fflush($sock) == FALSE)
+ continue;
+ else
+ $user->rd_toflush = FALSE;
+ }
$response = $user->rd_cache_get();
$do_ping = FALSE;
if (($this->curtime - $user->lacc) > (EXPIRE_TIME_RD / 3)) {
$response = $user->rd_cache_get();
$do_ping = FALSE;
if (($this->curtime - $user->lacc) > (EXPIRE_TIME_RD / 3)) {
@@
-911,7
+918,10
@@
class Sac_a_push {
else {
$user->rd_cache_set("");
}
else {
$user->rd_cache_set("");
}
- fflush($sock);
+ if (fflush($sock) == FALSE) {
+ $user->rd_toflush = TRUE;
+ continue;
+ }
$user->rd_kalive_reset($this->curtime);
}
$user->rd_kalive_reset($this->curtime);
}
@@
-931,7
+941,9
@@
class Sac_a_push {
} // if (isset($this->s2u[$id]...
} // foreach ($this->socks...
printf("\n");
} // if (isset($this->s2u[$id]...
} // foreach ($this->socks...
printf("\n");
- $this->app->cds->process();
+ if (defined('CURL_DE_SAC_VERS')) {
+ $this->app->cds->process();
+ }
} // while (...
} // function run(...
} // while (...
} // function run(...