mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Update ProtocolStreamReader
This commit is contained in:
parent
7249539fc6
commit
e6fcb79392
@ -42,10 +42,12 @@ class ProtocolStreamReader implements ProtocolReader
|
|||||||
{
|
{
|
||||||
$input = new ResourceInputStream($input);
|
$input = new ResourceInputStream($input);
|
||||||
asyncCall(
|
asyncCall(
|
||||||
function () use ($input): \Generator {
|
function () use ($input) : \Generator {
|
||||||
while (($chunk = yield $input->read()) !== null) {
|
while ($this->is_accepting_new_requests && ($chunk = yield $input->read()) !== null) {
|
||||||
/** @var string $chunk */
|
/** @var string $chunk */
|
||||||
$this->readMessages($chunk);
|
if ($this->readMessages($chunk) > 0) {
|
||||||
|
$this->emit('readMessageGroup');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->emitClose();
|
$this->emitClose();
|
||||||
|
Loading…
Reference in New Issue
Block a user