From 7e9fb2806f301f98b48e462d18fd1d3531db024a Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 11 Sep 2017 10:57:30 +0200 Subject: Do not make longer waiting than 500ms on iteration Signed-off-by: Szczepan Zalega --- include/device_proto.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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:" -- cgit v1.2.3