Page MenuHomePhabricator

D14916.id36044.diff
No OneTemporary

D14916.id36044.diff

diff --git a/src/channel/PhutilSocketChannel.php b/src/channel/PhutilSocketChannel.php
--- a/src/channel/PhutilSocketChannel.php
+++ b/src/channel/PhutilSocketChannel.php
@@ -117,7 +117,8 @@
// NOTE: fread() continues returning empty string after the socket is
// closed, we need to check for EOF explicitly.
if ($data === '') {
- if (feof($socket)) {
+ $stream_meta_data = stream_get_meta_data($socket);
+ if (feof($socket) || $stream_meta_data['unread_bytes'] <= 0) {
$this->closeReadSocket();
}
}

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 3:30 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720426
Default Alt Text
D14916.id36044.diff (552 B)

Event Timeline