File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 44
55## ` v1.6 `
66
7- > PHP version ` ^7.2 `
7+ > PHP version ` ^7.2|^8.0 `
88
99### ` 1.6.0 `
1010
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
Original file line number Diff line number Diff 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 }" ;
You can’t perform that action at this time.
0 commit comments