mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +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);
|
||||
asyncCall(
|
||||
function () use ($input): \Generator {
|
||||
while (($chunk = yield $input->read()) !== null) {
|
||||
function () use ($input) : \Generator {
|
||||
while ($this->is_accepting_new_requests && ($chunk = yield $input->read()) !== null) {
|
||||
/** @var string $chunk */
|
||||
$this->readMessages($chunk);
|
||||
if ($this->readMessages($chunk) > 0) {
|
||||
$this->emit('readMessageGroup');
|
||||
}
|
||||
}
|
||||
|
||||
$this->emitClose();
|
||||
|
Loading…
Reference in New Issue
Block a user