]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/listener/tcp/class_TcpListener.php
Verification of server socket improved
[hub.git] / 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