Skip to content

Commit

Permalink
Enhance StreamConnection::isClosed() detection
Browse files Browse the repository at this point in the history
Sometimes when dealing with amphp StreamConnection::$stream reset to 0
  • Loading branch information
Eugene Leonovich committed Feb 21, 2018
1 parent 45776ce commit 3431c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Connection/StreamConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function close()

public function isClosed()
{
return null === $this->stream;
return !\is_resource($this->stream);
}

public function send($data)
Expand Down

0 comments on commit 3431c44

Please sign in to comment.