diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/device_proto.h | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/include/device_proto.h b/include/device_proto.h index 6e21f9f..78abe38 100644 --- a/include/device_proto.h +++ b/include/device_proto.h @@ -215,11 +215,14 @@ class Transaction : semantics::non_constructible {      Log::instance()("Incoming HID packet:", Loglevel::DEBUG);      Log::instance()((std::string)(resp), Loglevel::DEBUG); +    Log::instance()(std::string("Retry count: ") + std::to_string(retry), Loglevel::DEBUG);      if (!resp.isValid()) throw std::runtime_error("Invalid incoming packet"); +    if (retry <= 0) throw std::runtime_error("Maximum retry count reached for receiving response from the device!");      if (resp.last_command_status!=0) throw CommandFailedException(resp.command_id, resp.last_command_status); -    // See: DeviceResponse + +      // See: DeviceResponse      return resp.payload;    } | 
