Kaynağa Gözat

fix close($buffer)

walkor 10 yıl önce
ebeveyn
işleme
afe680fc77
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  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();