]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 17 Sep 2021 02:00:05 +0000 (04:00 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Sep 2021 02:00:05 +0000 (04:00 +0200)
- skip any class that isn't a socket container class to avoid stub messages

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/registry/socket/class_SocketRegistry.php

index a804df43c62a056ea582ca9a6527e3f49a4e78ec..cbd81b94589f62cea4510e300e189623f4210aff 100644 (file)
@@ -172,10 +172,8 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        // That one is found so "get" a registry key from it
                        $key = $this->getRegistryKeyFromInfo($infoInstance);
 
-                       // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: protocolName=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ' - Trying to get instance ...');
-
                        // Get the registry
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: protocolName=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ' - Trying to get instance ...');
                        $registryInstance = $this->getInstance($key);
 
                        // "Get" a key for the socket
@@ -299,7 +297,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        foreach ($registryInstance->getInstanceRegistry() as $subKey => $socketInstance) {
                                // Is this a StorableSocket instance and is the address the same?
                                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: key=%s,subKey=%s,socketInstance=%s', $key, $subKey, $socketInstance->__toString()));
-                               if ($socketInstance->ifAddressMatches($packageInstance->getRecipientUnl())) {
+                               if (($socketInstance instanceof StorableSocket) && ($socketInstance->ifAddressMatches($packageInstance->getRecipientUnl()))) {
                                        // Get listener and helper instances
                                        /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: key=%s,subKey=%s, calling socketInstance->getListenerInstance() ...', $key, $subKey));
                                        //* DEBUG-DIE: */ die(__METHOD__ . ': socketInstance=' . print_r($socketInstance, TRUE));