From 2486fb4ee030b08c9eb4cb74d1bd3a261afc8c8f Mon Sep 17 00:00:00 2001 From: Marton Date: Wed, 27 May 2020 20:54:38 +0200 Subject: [PATCH] fix: on heartbeat timeout, try to reconnect before throwing error --- src/dock.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/dock.cpp b/src/dock.cpp index 1ea9aec..a2865e6 100755 --- a/src/dock.cpp +++ b/src/dock.cpp @@ -301,18 +301,5 @@ void Dock::onHeartbeat() { void Dock::onHeartbeatTimeout() { qCDebug(m_logCategory) << "Heartbeat timeout!"; - disconnect(); - - qCDebug(m_logCategory) << "Creating notification"; - - QObject *param = this; - m_notifications->add( - true, tr("Connection dropped to ").append(friendlyName()).append("."), tr("Reconnect"), - [](QObject *param) { - Integration *i = qobject_cast(param); - i->connect(); - }, - param); - - qCDebug(m_logCategory) << "Added notification"; + onTimeout(); }