Skip to content

Commit

Permalink
Fix issue where port was missing in socker uri (@sirn-se)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirn-se committed Nov 2, 2022
1 parent 25848ca commit bbb04fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

> PHP version `^7.4|^8.0`
### `1.6.`

* Fix issue where port was missing in socker uri (@sirn-se)

### `1.6.1`

* Fix client path for http request (@simPod, @sirn-se)
Expand Down
8 changes: 5 additions & 3 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,12 @@ protected function connect(): void
{
$this->connection = null;

$host_uri = (new Uri())
->withHost($this->socket_uri->getHost())
$host_uri = $this->socket_uri
->withScheme($this->socket_uri->getScheme() == 'wss' ? 'ssl' : 'tcp')
->withPort($this->socket_uri->getPort());
->withPath('')
->withQuery('')
->withFragment('')
->withUserInfo('');

// Path must be absolute
$http_path = $this->socket_uri->getPath();
Expand Down

0 comments on commit bbb04fa

Please sign in to comment.