summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-02-28 22:50:45 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:51 +0100
commit29375e7953041766de7c44ea5574cf80d5916e41 (patch)
treee3c81a43848ff4b6c0c64caf68dd4e9fb5a79599
parent7ab1b59b13477310d0ff631dd9e6686d6ebf4e91 (diff)
downloadlibnitrokey-29375e7953041766de7c44ea5574cf80d5916e41.tar.gz
libnitrokey-29375e7953041766de7c44ea5574cf80d5916e41.tar.bz2
Do reconnect also on receiving failure
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--device.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/device.cc b/device.cc
index 940a654..ddbfe85 100644
--- a/device.cc
+++ b/device.cc
@@ -130,6 +130,7 @@ int Device::recv(void *packet) {
Loglevel::DEBUG);
break;
}
+ _reconnect();
LOG("Retrying... " + std::to_string(retry_count),
Loglevel::DEBUG);
std::this_thread::sleep_for(m_retry_timeout);