diff options
-rw-r--r-- | NitrokeyManager.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index fa32557..57ef878 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -144,8 +144,14 @@ namespace nitrokey{ } stick10::GetStatus::ResponsePayload NitrokeyManager::get_status(){ - auto response = GetStatus::CommandTransaction::run(device); - return response.data(); + try{ + auto response = GetStatus::CommandTransaction::run(device); + return response.data(); + } + catch (DeviceSendingFailure &e){ + disconnect(); + throw; + } } string NitrokeyManager::get_status_as_string() { |