]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
place disconnectCurrentNode outside connectToNode
authorgg <chown_tee@proton.me>
Tue, 13 Jan 2026 02:35:14 +0000 (21:35 -0500)
committergg <chown_tee@proton.me>
Tue, 13 Jan 2026 02:35:14 +0000 (21:35 -0500)
src/utils/nodes.cpp

index c4e09d5c81603912ab56147cc4acccadc15ec795..12bd749a5d0ce7fac5386dc4654937222f334fed 100644 (file)
@@ -207,21 +207,6 @@ void Nodes::connectToNode(const FeatherNode &node) {
     if (!node.isValid()) {
         return;
     }
-}
-
-void Nodes::disconnectCurrentNode() {
-    if (!m_wallet) return;
-
-    // Stop any ongoing connection attempt
-    m_connection.isActive = false;
-    m_connection.isConnecting = false;
-
-    // Connect to empty "node" effectively disconnects
-    m_wallet->initAsync("", false, 0);
-
-    this->resetLocalState();
-    this->updateModels();
-}
 
     if (conf()->get(Config::offlineMode).toBool()) {
         return;
@@ -263,6 +248,20 @@ void Nodes::disconnectCurrentNode() {
     this->updateModels();
 }
 
+void Nodes::disconnectCurrentNode() {
+    if (!m_wallet) return;
+
+    // Stop any ongoing connection attempt
+    m_connection.isActive = false;
+    m_connection.isConnecting = false;
+
+    // Connect to empty "node" effectively disconnects
+    m_wallet->initAsync("", false, 0);
+
+    this->resetLocalState();
+    this->updateModels();
+}
+
 void Nodes::autoConnect(bool forceReconnect) {
     if (!m_wallet) {
         return;