Przeglądaj źródła

fixbug

fix process exit with status 139 when they don't have protocol
laogui 7 lat temu
rodzic
commit
991f3cdf31
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Connection/TcpConnection.php

+ 1 - 1
Connection/TcpConnection.php

@@ -875,7 +875,7 @@ class TcpConnection extends ConnectionInterface
             }
         }
         // Try to emit protocol::onClose
-        if (method_exists($this->protocol, 'onClose')) {
+        if (is_object($this->protocol) && method_exists($this->protocol, 'onClose')) {
             try {
                 call_user_func(array($this->protocol, 'onClose'), $this);
             } catch (\Exception $e) {