Skip to content

Commit e3225db

Browse files
committed
Merge branch 'master' into v1.6-master
2 parents b6e2aed + 62bc84e commit e3225db

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/Changelog.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## `v1.6`
66

7-
> PHP version `^7.2`
7+
> PHP version `^7.2|^8.0`
88
99
### `1.6.0`
1010

@@ -14,7 +14,11 @@
1414

1515
## `v1.5`
1616

17-
> PHP version `^7.2`
17+
> PHP version `^7.2|^8.0`
18+
19+
### `1.5.3`
20+
21+
* Fix for persistent connection (@sirn-se)
1822

1923
### `1.5.2`
2024

lib/Client.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ protected function connect(): void
440440
throw new ConnectionException($error);
441441
}
442442

443+
$address = "{$scheme}://{$host}{$path_with_query}";
444+
443445
if (!$persistent || $this->connection->tell() == 0) {
444446
// Set timeout on the stream as well.
445447
$this->connection->setTimeout($this->options['timeout']);
@@ -489,10 +491,6 @@ function ($key, $value) {
489491
// Get server response header (terminated with double CR+LF).
490492
$response = $this->connection->getLine(1024, "\r\n\r\n");
491493

492-
/// @todo Handle version switching
493-
494-
$address = "{$scheme}://{$host}{$path_with_query}";
495-
496494
// Validate response.
497495
if (!preg_match('#Sec-WebSocket-Accept:\s(.*)$#mUi', $response, $matches)) {
498496
$error = "Connection to '{$address}' failed: Server sent invalid upgrade response: {$response}";

0 commit comments

Comments
 (0)