From: Roland Häder Date: Sat, 19 May 2012 16:58:52 +0000 (+0000) Subject: Verification of server socket improved X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64fb65a5db4598fde8a222b88a7024009ec19467;p=hub.git Verification of server socket improved --- diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index 25604efa5..8d0a97596 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -308,7 +308,7 @@ class TcpListener extends BaseListener implements Listenable { // Handle it here, if not main socket /* NOISY-DEBUG: */ $this->debugOutput('TCP-LISTENER: currentSocket=' . $currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',server=' . $this->getSocketResource()); - if ($currentSocket != $this->getSocketResource()) { + if (($currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] != BaseConnectionHelper::CONNECTION_TYPE_SERVER) && ($currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] != $this->getSocketResource())) { // ... or else it will raise warnings like 'Transport endpoint is not connected' $this->getHandlerInstance()->processRawDataFromResource($currentSocket); } // END - if