Skip to content

Commit 09427f8

Browse files
committed
Close buffer when end() is called and last message is sent
1 parent ba9adaa commit 09427f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Datagram/Buffer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public function handleWrite()
5555
if (!$this->outgoing) {
5656
$this->loop->removeWriteStream($this->socket);
5757
$this->listening = false;
58+
59+
if (!$this->writable) {
60+
$this->close();
61+
}
5862
}
5963
}
6064

0 commit comments

Comments
 (0)