]> git.mxchange.org Git - hub.git/commitdiff
Verification of server socket improved
authorRoland Häder <roland@mxchange.org>
Sat, 19 May 2012 16:58:52 +0000 (16:58 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 19 May 2012 16:58:52 +0000 (16:58 +0000)
application/hub/main/listener/tcp/class_TcpListener.php

index 25604efa50db1534a8c8246060e21e5428338485..8d0a97596260c1d3d2507a0ccaa367eaea9ccebc 100644 (file)
@@ -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