]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/states/dht/class_BaseDhtState.php
Allow 'init' state for bootstrap nodes.
[hub.git] / application / hub / main / states / dht / class_BaseDhtState.php
index 88c2de0c645ca90128b5fbb1ecd21ac0e8b47fc0..78b10f3cf47b4571918a464ee4b3a0af657c0c08 100644 (file)
@@ -41,9 +41,9 @@ class BaseDhtState extends BaseState {
         * @return      void
         * @throws      InvalidStateException   If the state is not 'virgin'
         */
-       public function validateDhtStateIsVirgin () {
+       public function validateDhtStateIsVirginOrInit () {
                // Just compare it...
-               if (!$this instanceof DhtVirginState) {
+               if ((!$this instanceof DhtVirginState) && (!$this instanceof DhtInitState)) {
                        // Throw the exception
                        throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
                } // END - if