Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14012632
D14916.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
552 B
Referenced Files
None
Subscribers
None
D14916.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14916: Possible fix for invalid EOF detection on sockets
Attached
Detach File
Event Timeline
Log In to Comment