Page MenuHomePhabricator

D14916.diff
No OneTemporary

D14916.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
Sat, Nov 2, 2:54 PM (5 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720426
Default Alt Text
D14916.diff (552 B)

Event Timeline