Parcourir la source

Update TcpConnection.php

walkor il y a 4 ans
Parent
commit
ab9a28b03c
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      Connection/TcpConnection.php

+ 3 - 0
Connection/TcpConnection.php

@@ -469,6 +469,9 @@ class TcpConnection extends ConnectionInterface
      */
     public function getLocalAddress()
     {
+        if (!\is_resource($this->_socket)) {
+            return '';
+        }
         return (string)@\stream_socket_get_name($this->_socket, false);
     }