Servd: Disable signal on send failure

This commit is contained in:
Kyle Schwarz
2026-06-18 10:21:35 -04:00
parent 44d0e3de64
commit 4dd97f734a
2 changed files with 13 additions and 1 deletions
+4
View File
@@ -113,6 +113,10 @@ bool Servd::open() {
return false;
}
const auto tokens = split(response);
if(tokens.size() == 1 && tokens[0] == "0") {
EventManager::GetInstance().add(APIEvent::Type::DeviceDisconnected, APIEvent::Severity::Error);
return false;
}
if(tokens.size() != 2) {
EventManager::GetInstance().add(APIEvent::Type::ServdInvalidResponseError, APIEvent::Severity::Error);
return false;