Explorar o código

fix close($buffer)

walkor %!s(int64=10) %!d(string=hai) anos
pai
achega
afe680fc77
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      Workerman/Connection/TcpConnection.php

+ 4 - 4
Workerman/Connection/TcpConnection.php

@@ -542,12 +542,12 @@ class TcpConnection extends ConnectionInterface
         }
         else
         {
+            if($data !== null)
+            {
+                $this->send($data);
+            }
             $this->_status = self::STATUS_CLOSING;
         }
-        if($data !== null)
-        {
-            $this->send($data);
-        }
         if($this->_sendBuffer === '')
         {
            $this->destroy();