소스 검색

fix close($buffer)

walkor 10 년 전
부모
커밋
afe680fc77
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  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();