From 8e999a0fb8af4d2133a4e5b22eb4d632879939fe Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Tue, 1 Sep 2020 16:32:54 -0400 Subject: [PATCH] Heartbeat: Break from loop rather than returning This makes sure we run the cleanup code at the bottom of the thread --- device/device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device/device.cpp b/device/device.cpp index d28f2fa..2ab887f 100644 --- a/device/device.cpp +++ b/device/device.cpp @@ -240,7 +240,7 @@ bool Device::open() { if(!receivedMessage && !settings->applyingSettings) { if(!stopHeartbeatThread) report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); - return; + break; } } receivedMessage = false;