File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ protected function connect(): void
128
128
throw new ConnectionException ($ error );
129
129
}
130
130
131
+ $ address = "{$ scheme }:// {$ host }{$ path_with_query }" ;
132
+
131
133
if (!$ persistent || ftell ($ this ->socket ) == 0 ) {
132
134
// Set timeout on the stream as well.
133
135
stream_set_timeout ($ this ->socket , $ this ->options ['timeout ' ]);
@@ -177,10 +179,6 @@ function ($key, $value) {
177
179
// Get server response header (terminated with double CR+LF).
178
180
$ response = stream_get_line ($ this ->socket , 1024 , "\r\n\r\n" );
179
181
180
- /// @todo Handle version switching
181
-
182
- $ address = "{$ scheme }:// {$ host }{$ path_with_query }" ;
183
-
184
182
// Validate response.
185
183
if (!preg_match ('#Sec-WebSocket-Accept:\s(.*)$#mUi ' , $ response , $ matches )) {
186
184
$ error = "Connection to ' {$ address }' failed: Server sent invalid upgrade response: {$ response }" ;
You can’t perform that action at this time.
0 commit comments