From 4e7314a4b016c2c86a68f644d6816485d7ec1723 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 16 Jan 2014 19:32:46 +0100 Subject: [PATCH] Don't restart timer if explicitly set to singleShot --- src/insomnia.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/insomnia.cpp b/src/insomnia.cpp index 8cae8ab..57dbf35 100644 --- a/src/insomnia.cpp +++ b/src/insomnia.cpp @@ -224,7 +224,9 @@ void Insomnia::heartbeatReceived(int sock) { stop(); emit timeout(); - start(); + if (!m_singleShot) { + start(); + } } bool Insomnia::isActive() const