Explorar el Código

fixbug

fix process exit with status 139 when they don't have protocol
laogui hace 7 años
padre
commit
991f3cdf31
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) {