SDK: Improve error handling in case state-change fails on a device

Replace the log message with

1. Nothing, if the device is already in the target state
2. Abort and call the completion callback with error otherwise
This commit is contained in:
Dennis Klein
2019-07-28 12:00:46 +02:00
committed by Dennis Klein
parent fd282fa950
commit 7b773cde51
2 changed files with 24 additions and 4 deletions

View File

@@ -150,6 +150,7 @@ class Topology
ChangeStateCallback fChangeStateCallback;
std::chrono::milliseconds fStateChangeTimeout;
bool fShutdown;
std::string fStateChangeError;
void WaitForState();
void AddNewStateEntry(uint64_t senderId, const std::string& state);