From eba57c52fc280cf7fcc2ad4be5959062db4ade5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 17 Sep 2021 04:00:05 +0200 Subject: [PATCH] Continued: - skip any class that isn't a socket container class to avoid stub messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../hub/classes/registry/socket/class_SocketRegistry.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/hub/classes/registry/socket/class_SocketRegistry.php b/application/hub/classes/registry/socket/class_SocketRegistry.php index a804df43c..cbd81b945 100644 --- a/application/hub/classes/registry/socket/class_SocketRegistry.php +++ b/application/hub/classes/registry/socket/class_SocketRegistry.php @@ -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)); -- 2.39.5