Browse Source

Merge pull request #218 from ares333/patch-1

solve int overflow
walkor 8 năm trước cách đây
mục cha
commit
77fd43af2b
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      Connection/AsyncTcpConnection.php

+ 3 - 0
Connection/AsyncTcpConnection.php

@@ -137,6 +137,9 @@ class AsyncTcpConnection extends TcpConnection
         }
 
         $this->id = $this->_id = self::$_idRecorder++;
+        if(PHP_INT_MAX === self::$_idRecorder){
+            self::$_idRecorder = 0;
+        }
         // Check application layer protocol class.
         if (!isset(self::$_builtinTransports[$scheme])) {
             $scheme         = ucfirst($scheme);