Avoid problems with HTTP

This commit is contained in:
Daniil Gentili 2019-09-15 18:19:51 +02:00
parent 0fcf83d9ad
commit f6573be332
2 changed files with 12 additions and 1 deletions

View File

@ -427,6 +427,17 @@ class Connection extends Session
$this->writer->resume();
}
}
/**
* Resume HttpWaiter
*
* @return void
*/
public function pingHttpWaiter()
{
if (isset($this->waiter)) {
$this->waiter->resume();
}
}
/**
* Connect main instance.
*

View File

@ -130,7 +130,7 @@ class ReadLoop extends SignalLoop
Loop::defer([$connection, 'handle_messages']);
if ($shared->isHttp()) {
Loop::defer([$connection->waiter, 'resume']);
Loop::defer([$connection, 'pingHttpWaiter']);
}
}
}