Explorar o código

Discard sending data when status is connecting on close.

Ares %!s(int64=6) %!d(string=hai) anos
pai
achega
01ea5037f2
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Connection/TcpConnection.php

+ 4 - 0
Connection/TcpConnection.php

@@ -836,6 +836,10 @@ class TcpConnection extends ConnectionInterface
      */
     public function close($data = null, $raw = false)
     {
+        if($this->_status === self::STATUS_CONNECTING){
+            $this->destroy();
+            return;
+        }
         if ($this->_status === self::STATUS_CLOSING || $this->_status === self::STATUS_CLOSED) {
             return;
         } else {