Commit
This commit is contained in:
parent
1a68caced4
commit
88d7cabacb
@ -24,19 +24,20 @@ class EventLoop
|
|||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Cache-Control: no-store");
|
header('Cache-Control: no-store, must-revalidate');
|
||||||
header("Content-Type: text/event-stream");
|
header('Content-Type: text/event-stream');
|
||||||
header('X-Accel-Buffering: no'); // for nginx buffering
|
// explicitly disable caching so varnish and other upstreams won't cache.
|
||||||
|
header('Cache-Control: no-cache, must-revalidate');
|
||||||
|
// instruct nginx to disable fastcgi_buffering and disable gzip
|
||||||
|
header('X-Accel-Buffering: no');
|
||||||
|
|
||||||
// send headers to client indicating we are now a stream
|
// send headers to client indicating we are now a stream
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
$expirationTime = time() + $this->timeLimit;
|
|
||||||
|
|
||||||
$lastHeartbeat = time();
|
$lastHeartbeat = time();
|
||||||
|
|
||||||
while (!connection_aborted() && time() < $expirationTime)
|
while (!connection_aborted() && time() < (time() + $this->timeLimit))
|
||||||
{
|
{
|
||||||
set_time_limit($this->execLimit);
|
set_time_limit($this->execLimit);
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user