Explorar el Código

Fixed SSL connection send returning null and onWebsocketConnected isn't called.

Ako Tulu hace 1 año
padre
commit
a3bf4be342
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/Protocols/Websocket.php

+ 2 - 2
src/Protocols/Websocket.php

@@ -492,13 +492,13 @@ class Websocket
             }
             $handshakeMessage .= "\r\n";
             // Send handshake response.
-            $status = $connection->send($handshakeMessage, true);
+            $connection->send($handshakeMessage, true);
             // Mark handshake complete.
             $connection->context->websocketHandshake = true;
 
             // Try to emit onWebSocketConnected callback.
             $onWebsocketConnected = $connection->onWebSocketConnected ?? $connection->worker->onWebSocketConnected ?? false;
-            if ($status && $onWebsocketConnected) {
+            if ($onWebsocketConnected) {
                 try {
                     $onWebsocketConnected($connection, $request);
                 } catch (Throwable $e) {