aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-09-11 10:57:30 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-09-20 12:47:05 +0200
commit7e9fb2806f301f98b48e462d18fd1d3531db024a (patch)
tree11924a1b6d296a140c7bc62831cc3492fb5d771f
parent8ea7214692243eadf18c4cdabf66500e8357ba0c (diff)
downloadlibnitrokey-7e9fb2806f301f98b48e462d18fd1d3531db024a.tar.gz
libnitrokey-7e9fb2806f301f98b48e462d18fd1d3531db024a.tar.bz2
Do not make longer waiting than 500ms on iteration
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--include/device_proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/device_proto.h b/include/device_proto.h
index c126acd..691c17b 100644
--- a/include/device_proto.h
+++ b/include/device_proto.h
@@ -312,6 +312,7 @@ namespace nitrokey {
std::to_string(receiving_retry_counter), Loglevel::DEBUG_L2);
} else {
retry_timeout *= 2;
+ retry_timeout = std::min(retry_timeout, 500ms);
busy_counter = 0;
LOG("Status busy, decreasing receiving_retry_counter counter: " +
std::to_string(receiving_retry_counter) + ", current delay:"