Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13965663
D14916.id36044.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.id36044.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
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)
Attached To
Mode
D14916: Possible fix for invalid EOF detection on sockets
Attached
Detach File
Event Timeline
Log In to Comment