Browse Source

support ipv6

walkor 9 năm trước cách đây
mục cha
commit
feb3937a4e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Connection/TcpConnection.php

+ 1 - 1
Connection/TcpConnection.php

@@ -307,7 +307,7 @@ class TcpConnection extends ConnectionInterface
     {
         $pos = strrpos($this->_remoteAddress, ':');
         if ($pos) {
-            return substr($this->_remoteAddress, 0, $pos);
+            return trim(substr($this->_remoteAddress, 0, $pos), '[]');
         }
         return '';
     }