Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
fix: on heartbeat timeout, try to reconnect before throwing error
Browse files Browse the repository at this point in the history
  • Loading branch information
martonborzak committed May 27, 2020
1 parent b577f46 commit 2486fb4
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integration *>(param);
i->connect();
},
param);

qCDebug(m_logCategory) << "Added notification";
onTimeout();
}

0 comments on commit 2486fb4

Please sign in to comment.