Skip to content

Commit

Permalink
Additional check for stream resource
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilFreelancer committed Oct 18, 2021
1 parent 0086b6d commit 7d9f783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SocketTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private function openSocket(): void
);

// Throw error is socket is not initiated
if (false === $socketClient) {
if (false === $socketClient || !is_resource($socketClient)) {
throw new ConnectException('Unable to establish socket session, ' . $socketErrorString, $socketErrorNumber);
}

Expand Down

0 comments on commit 7d9f783

Please sign in to comment.