Selaa lähdekoodia

fix close($buffer)

walkor 10 vuotta sitten
vanhempi
commit
afe680fc77
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  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();