1
0
mirror of https://github.com/danog/ipc.git synced 2024-11-26 20:15:05 +01:00

Avoid hangs

This commit is contained in:
Daniil Gentili 2020-09-24 21:06:18 +02:00
parent 1313eb755a
commit 1ee91452f4
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -71,6 +71,9 @@ final class ChannelledSocket implements Channel
yield $this->channel->send(new ChannelCloseAck);
$this->state = self::GOT_FIN_MASK;
yield $this->disconnect();
if ($this->closePromise) {
$this->closePromise->resolve($data);
}
return null;
} elseif ($data instanceof ChannelCloseAck) {
$this->closePromise->resolve($data);