]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php
Continued:
[hub.git] / application / hub / main / wrapper / node / class_NodeDistributedHashTableDatabaseWrapper.php
index ab01534f1eca6a01c59321f6e16329a12dd7d1e1..e7759ba14931f17a7024b9aa924d2462666e700e 100644 (file)
@@ -605,8 +605,14 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
                // Debug message
                /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: Enabling DHT bootstrap requests ...');
 
-               // Just update our record
-               $this->updateLocalNode();
+               // Is the node already registered?
+               if ($this->isLocalNodeRegistered()) {
+                       // Just update our record
+                       $this->updateLocalNode();
+               } else {
+                       // Register it
+                       $this->registerLocalNode();
+               }
        }
 }