]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
Swapped out seperator char for all boostrap nodes
[hub.git] / application / hub / main / discovery / package / class_PackageRecipientDiscovery.php
index 85033220f2984dcf302c71358f245a6c32afaaa0..bf591a84820f029c3dffb9e7cb987e3928c0ce88 100644 (file)
@@ -59,11 +59,11 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable
                $listInstance = RecipientListFactory::createRecipientListInstance();
 
                // We do some rudimentary checks but this might be a bit ugly
-               switch ($packageData['recipient']) {
+               switch ($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]) {
                        // All upper hubs, these are currently the bootstrap nodes and later on prepended list-nodes
                        case NetworkPackage::NETWORK_TARGET_UPPER_HUBS:
                                // Get all bootstrap nodes
-                               foreach (explode(';', $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $node) {
+                               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPERATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $node) {
                                        // Add the entry
                                        $listInstance->addEntry('ip_port', $node);
                                } // END - foreach
@@ -99,7 +99,7 @@ class PackageRecipientDiscovery extends BaseHubDiscovery implements Discoverable
 
                        // This may be a direct recipient (hub's session id)
                        default:
-                               $this->partialStub('Please add code handling recipients ' . $packageData['recipient']);
+                               $this->partialStub('Please add code handling recipients ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
                                break;
                } // END - switch
        }