Skip to content

Commit

Permalink
Replicate "end" event from connection to input
Browse files Browse the repository at this point in the history
Fixes friends-of-reactphp#24 without throwing exception as in friends-of-reactphp#25
  • Loading branch information
blex18 authored and teefax committed Nov 11, 2020
1 parent a91a16a commit ed5c7a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function createClient(array $options = array())
$input->emit('close');
});

$conn->on('end', function ($e) use ($input) {
$input->emit('end', array($e));
});

return new Client($this->loop, $input, $output, $options);
}

Expand Down

0 comments on commit ed5c7a3

Please sign in to comment.