Jens-G commented on a change in pull request #2134:
URL: https://github.com/apache/thrift/pull/2134#discussion_r422469774



##########
File path: lib/php/lib/Transport/TSocket.php
##########
@@ -328,7 +328,8 @@ public function write($buf)
             if ($writable > 0) {
                 // write buffer to stream
                 $written = fwrite($this->handle_, $buf);
-                if ($written === -1 || $written === false) {
+                $closed_socket = $written === 0 && feof($this->handle_);
+                if ($written === -1 || $written === false || $closed_socket) {
                     throw new TTransportException(

Review comment:
           $written === false
   
   Not your code, but I always wonder if a language has no boolean operators 
when I see code like this. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to