From: gg Date: Mon, 12 Jan 2026 22:30:42 +0000 (-0500) Subject: muzzle WebSocket when in pause mode X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=960ae849264529de03b967d23d713dab0244dc03;p=gamesguru%2Ffeather.git muzzle WebSocket when in pause mode --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 42badc46..b45f903f 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -220,10 +220,12 @@ void MainWindow::initStatusBar() { if (m_wallet) { if (checked) { m_wallet->setSyncPaused(true); + websocketNotifier()->websocketClient->stop(); this->setPausedSyncStatus(); } else { m_wallet->setSyncPaused(false); + websocketNotifier()->websocketClient->restart(); this->setStatusText(tr("Resuming sync...")); } } diff --git a/src/utils/WebsocketClient.cpp b/src/utils/WebsocketClient.cpp index fd0e089a..fe96fb81 100644 --- a/src/utils/WebsocketClient.cpp +++ b/src/utils/WebsocketClient.cpp @@ -57,6 +57,10 @@ void WebsocketClient::start() { return; } + if (conf()->get(Config::syncPaused).toBool()) { + return; + } + // connect & reconnect on errors/close auto state = webSocket->state(); if (state != QAbstractSocket::ConnectedState && state != QAbstractSocket::ConnectingState) {