Added check to see if message polling is enabled before disabling it in device destructor

checksum-failure-logging
EricLiu2000 2019-08-01 14:08:12 -04:00
parent f41b5c4a79
commit 453f098cdb
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ class Device {
public:
virtual ~Device() {
destructing = true;
disableMessagePolling();
if(isMessagePollingEnabled())
disableMessagePolling();
close();
}