mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Ensure proper closure of the heartbeat thread on reopen
This commit is contained in:
@@ -27,13 +27,7 @@ namespace icsneo {
|
||||
|
||||
class Device {
|
||||
public:
|
||||
virtual ~Device() {
|
||||
if(isMessagePollingEnabled())
|
||||
disableMessagePolling();
|
||||
close();
|
||||
if(heartbeatThread.joinable())
|
||||
heartbeatThread.join();
|
||||
}
|
||||
virtual ~Device();
|
||||
|
||||
static std::string SerialNumToString(uint32_t serial);
|
||||
static uint32_t SerialStringToNum(const std::string& serial);
|
||||
@@ -103,7 +97,6 @@ protected:
|
||||
bool online = false;
|
||||
int messagePollingCallbackID = 0;
|
||||
int internalHandlerCallbackID = 0;
|
||||
int messageReceivedCallbackID = 0;
|
||||
device_eventhandler_t report;
|
||||
|
||||
// START Initialization Functions
|
||||
|
||||
Reference in New Issue
Block a user