浏览代码

fixed improper if condition

Mark Magyar 2 年之前
父节点
当前提交
2e0afcf621
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Connection/TcpConnection.php

+ 1 - 1
src/Connection/TcpConnection.php

@@ -686,7 +686,7 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
                 // The data is enough for a packet.
                 // The data is enough for a packet.
                 ++self::$statistics['total_request'];
                 ++self::$statistics['total_request'];
                 // The current packet length is equal to the length of the buffer.
                 // The current packet length is equal to the length of the buffer.
-                if ($one = strlen($this->recvBuffer) === $this->currentPackageLength) {
+                if ($one = (strlen($this->recvBuffer) === $this->currentPackageLength)) {
                     $oneRequestBuffer = $this->recvBuffer;
                     $oneRequestBuffer = $this->recvBuffer;
                     $this->recvBuffer = '';
                     $this->recvBuffer = '';
                 } else {
                 } else {