Commit
This commit is contained in:
parent
1a68caced4
commit
88d7cabacb
@ -24,19 +24,20 @@ class EventLoop
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
header("Cache-Control: no-store");
|
||||
header("Content-Type: text/event-stream");
|
||||
header('X-Accel-Buffering: no'); // for nginx buffering
|
||||
header('Cache-Control: no-store, must-revalidate');
|
||||
header('Content-Type: text/event-stream');
|
||||
// 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
|
||||
ob_end_flush();
|
||||
flush();
|
||||
|
||||
$expirationTime = time() + $this->timeLimit;
|
||||
|
||||
$lastHeartbeat = time();
|
||||
|
||||
while (!connection_aborted() && time() < $expirationTime)
|
||||
while (!connection_aborted() && time() < (time() + $this->timeLimit))
|
||||
{
|
||||
set_time_limit($this->execLimit);
|
||||
try {
|
||||
|
Reference in New Issue
Block a user