Properly output TimeoutError

Fixed issue where receiver devices aren't detected (hopefully).
This commit is contained in:
pixl
2020-07-12 02:51:56 -04:00
parent 9ad8ce0fea
commit f7638b0905
10 changed files with 64 additions and 38 deletions
+4
View File
@@ -24,6 +24,7 @@
#include "util/log.h"
#include "backend/hidpp10/Error.h"
#include "backend/dj/Receiver.h"
#include "backend/Error.h"
#define NON_WIRELESS_DEV(index) (index) == HIDPP::DefaultDevice ? "default" : "corded"
@@ -46,6 +47,9 @@ void DeviceManager::addDevice(std::string path)
logPrintf(WARN, "I/O error on %s: %s, skipping device.",
path.c_str(), e.what());
return;
} catch (TimeoutError &e) {
logPrintf(WARN, "Device %s timed out.", path.c_str());
defaultExists = false;
}
if(isReceiver) {