From a8182274c84a7dbe09e91a62d563caf9fa4039c1 Mon Sep 17 00:00:00 2001 From: adityapk00 Date: Thu, 21 Feb 2019 19:51:49 -0800 Subject: [PATCH] Fix random crash --- .gitignore | 3 ++- src/websockets.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6e542ec..cea24dc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ debug/ release/ x64/ artifacts/ +docs/website/public .vscode/ res/libsodium.a res/libsodium/libsodium* @@ -29,4 +30,4 @@ workspace.code-workspace .DS_Store *.mak *.plist -zcashd \ No newline at end of file +zcashd diff --git a/src/websockets.cpp b/src/websockets.cpp index 7cf38b5..1096133 100644 --- a/src/websockets.cpp +++ b/src/websockets.cpp @@ -141,7 +141,7 @@ void WormholeClient::onConnected() // will timeout after 5 minutes timer = new QTimer(parent); QObject::connect(timer, &QTimer::timeout, [=]() { - if (m_webSocket->isValid()) { + if (!shuttingDown && m_webSocket->isValid()) { auto payload = QJsonDocument(QJsonObject { {"ping", "ping"} }).toJson();