Heartbeat: Break from loop rather than returning

This makes sure we run the cleanup code at the bottom of the thread
This commit is contained in:
Paul Hollinsky
2020-09-01 16:32:54 -04:00
parent a325d8a12b
commit 8e999a0fb8
+1 -1
View File
@@ -240,7 +240,7 @@ bool Device::open() {
if(!receivedMessage && !settings->applyingSettings) { if(!receivedMessage && !settings->applyingSettings) {
if(!stopHeartbeatThread) if(!stopHeartbeatThread)
report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error); report(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error);
return; break;
} }
} }
receivedMessage = false; receivedMessage = false;