Skip to content

Commit

Permalink
fix socket timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
danilin-em committed Apr 11, 2024
1 parent 26d6413 commit c903af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client/SocketClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public function connect(): void
STREAM_CLIENT_CONNECT,
$context
);
stream_set_timeout($this->socket, $this->timeout);
if ($socket === false) {
throw new ClientConnectionException(
sprintf('Cannot establish connection: [%d] %s', $errorCode, $errorMessage)
);
}
stream_set_timeout($this->socket, $this->timeout);
$this->socket = $socket;
}
}
Expand Down

0 comments on commit c903af0

Please sign in to comment.