Selaa lähdekoodia

使用static::$maxPackageSize 以更方便通过继承TcpConnection来设置不同服务接收的包大小

dtfreeman 7 vuotta sitten
vanhempi
commit
f1d71f67b0
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Connection/TcpConnection.php

+ 1 - 1
Connection/TcpConnection.php

@@ -610,7 +610,7 @@ class TcpConnection extends ConnectionInterface
                     // The packet length is unknown.
                     if ($this->_currentPackageLength === 0) {
                         break;
-                    } elseif ($this->_currentPackageLength > 0 && $this->_currentPackageLength <= self::$maxPackageSize) {
+                    } elseif ($this->_currentPackageLength > 0 && $this->_currentPackageLength <= static::$maxPackageSize) {
                         // Data is not enough for a package.
                         if ($this->_currentPackageLength > strlen($this->_recvBuffer)) {
                             break;