File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 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
128128 throw new ConnectionException ($ error );
129129 }
130130
131+ $ address = "{$ scheme }:// {$ host }{$ path_with_query }" ;
132+
131133 if (!$ persistent || ftell ($ this ->socket ) == 0 ) {
132134 // Set timeout on the stream as well.
133135 stream_set_timeout ($ this ->socket , $ this ->options ['timeout ' ]);
@@ -177,10 +179,6 @@ function ($key, $value) {
177179 // Get server response header (terminated with double CR+LF).
178180 $ response = stream_get_line ($ this ->socket , 1024 , "\r\n\r\n" );
179181
180- /// @todo Handle version switching
181-
182- $ address = "{$ scheme }:// {$ host }{$ path_with_query }" ;
183-
184182 // Validate response.
185183 if (!preg_match ('#Sec-WebSocket-Accept:\s(.*)$#mUi ' , $ response , $ matches )) {
186184 $ error = "Connection to ' {$ address }' failed: Server sent invalid upgrade response: {$ response }" ;
You can’t perform that action at this time.
0 commit comments