From: Matteo Nastasi Date: Sat, 20 Oct 2012 16:55:56 +0000 (+0200) Subject: modification to fix explorer bug. X-Git-Tag: v4.0.0~35 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=f3ef056194d18f022f0d8fba5b5df1947a849760;p=brisk.git modification to fix explorer bug. --- diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 7a99c87..fa78539 100644 --- 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; - $num_changed_sockets = stream_select($read, $write, $except, 5, 0); + $num_changed_sockets = stream_select($read, $write, $except, 0, 100000); if ($num_changed_sockets == 0) { printf(" no data in 5 secs "); @@ -455,7 +455,7 @@ class Sac_a_push { if ($response != "") { // echo "SPIA: [".substr($response, 0, 60)."...]\n"; - echo "SPIA: [".$response."...]\n"; + echo "SPIA: [".$response."]\n"; $response_l = mb_strlen($response, "ASCII"); $wret = @fwrite($sock, $response); if ($wret < $response_l) { @@ -486,4 +486,4 @@ class Sac_a_push { } // function run(... } -?> \ No newline at end of file +?> diff --git a/web/Obj/user.phh b/web/Obj/user.phh index a6f1b90..1fc59a2 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -710,7 +710,7 @@ class User { $S_load_stat['wR_minusone']++; if ($this->the_end == TRUE) { - log_rd2("main_check: the end".var_export(debug_backtrace())); + // log_rd2("main_check: the end".var_export(debug_backtrace())); $is_page_streaming = TRUE; } diff --git a/web/spush/brisk-spush.phh b/web/spush/brisk-spush.phh index d574183..f0bcfcb 100644 --- a/web/spush/brisk-spush.phh +++ b/web/spush/brisk-spush.phh @@ -34,6 +34,7 @@ class PageFlush { function PageFlush($socket, $curtime, $kalive, $header_out, $body) { + printf("TRY FLUSH CREATE\n"); // $body_sz = mb_strlen($body, "ASCII"); // add length to header_out $hea = headers_render($header_out, 0); @@ -47,22 +48,27 @@ class PageFlush { /* return TRUE if is removable from it's list */ function try_flush($curtime) { + printf("TRY FLUSH IN\n"); if ($this->kalive < $curtime) { + printf("TRY FLUSH CLOSE 1\n"); fclose($this->socket); return TRUE; } $wret = @fwrite($this->socket, $this->msg); if ($wret == FALSE && $wret !== FALSE) { - printf("PageFlush::try_flush: wret 0 but not FALSE\n"); + printf("TRY FLUSH PageFlush::try_flush: wret 0 but not FALSE\n"); } if ($wret == $this->msg_sz) { + printf("TRY FLUSH CLOSE 2\n"); fclose($this->socket); return TRUE; } $this->msg_sz -= $wret; $this->msg = mb_substr($this->msg, $wret, $this->msg_sz, "ASCII"); + printf("TRY FLUSH RETURN FALSE\n"); + return FALSE; } diff --git a/web/xynt-http-streaming.js b/web/xynt-http-streaming.js index 7d216aa..81f54cf 100644 --- a/web/xynt-http-streaming.js +++ b/web/xynt-http-streaming.js @@ -40,7 +40,7 @@ http_streaming.prototype = { keepalives_eq_max: 6, /* NOTE: right watch_timeout value to 100, for devel reasons use 1000 or more */ // FIXME watchdog_timeout: 200, - watchdog_timeout: 2000, + watchdog_timeout: 200, watchdog_ct: 0, watchdog_checktm: 20, watchable: false,