Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit ce904ec

Browse files
authored
Merge pull request #58 from timirey/hotfix/add-bools-to-socket-connection
Hotfix/add bools to socket connection
2 parents 4a3bbdf + 009612a commit ce904ec

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## [6.0.2](https://github.com/timirey/xapi-php/compare/6.0.1..6.0.2) - 2024-07-30
4+
5+
- Catch exceptions from `stream_socket_client()`.
6+
37
## [6.0.1](https://github.com/timirey/xapi-php/compare/6.0.0..6.0.1) - 2024-07-30
48

59
- Fixed `SocketConnection` exception messages to be more informative.

src/Connections/SocketConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __destruct()
5050
*/
5151
public function open(): bool
5252
{
53-
$this->socket = stream_socket_client($this->address, $errorCode, $errorMessage);
53+
$this->socket = @stream_socket_client($this->address, $errorCode, $errorMessage);
5454

5555
if (!$this->isConnected()) {
5656
throw new SocketException("$errorCode: $errorMessage");

0 commit comments

Comments
 (0)