]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/registry/socket/class_SocketRegistry.php
Even more debug lines added, check for SocketContainer added
[hub.git] / application / hub / main / registry / socket / class_SocketRegistry.php
index f6e402559806f9e0cbf78a32eb05eea11be44306..921cc04e99fdc4be7eae210088ea72942929662f 100644 (file)
@@ -218,10 +218,16 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
 
                // Get all keys and check them
                foreach ($this->getInstanceRegistry() as $key => $registryInstance) {
+                       // Debug message
+                       /* NOISY-DEBUG: */ $this->debugOutput('SOCKET-REGISTRY: key=' . $key . ',registryInstance=' . $registryInstance->__toString());
+
                        // This is always a SubRegistry instance
                        foreach ($registryInstance->getInstanceRegistry() as $subKey => $containerInstance) {
-                               // This is a SocketContainer instance, so does the recipient match?
-                               if ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) {
+                               // Debug message
+                               /* NOISY-DEBUG: */ $this->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',containerInstance=' . $containerInstance->__toString());
+
+                               // Is this a SocketContainer instance and is the address the same?
+                               if (($containerInstance instanceof SocketContainer) && ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]))) {
                                        // Found one, so get the protocol instance and abort any further search
                                        $protocolInstance = $containerInstance->getProtocolInstance();
                                        break;