From ec7fce72ac62d01ce7b85540c9d792a7bf0764f2 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Wed, 10 Jun 2020 10:24:48 +0200 Subject: [PATCH] fix sleep on empty updatevresponse --- bashbot.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 2a687a3..1c3e296 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.96-pre-25-gf4c1657 +#### $$VERSION$$ v0.96-pre-26-g848219d # # Exit Codes: # - 0 sucess (hopefully) @@ -826,8 +826,9 @@ start_bot() { fi else # ups, something bad happend, wait maxsleep - (( nextsleep=maxsleep )) - printf "%s: Timeout or broken/no connection on telegram update, sleep %ds\n" "$(date)" $((nextsleep))e-3 >>"${ERRORLOG}" + (( nextsleep=maxsleep*2 )) + printf "%s: Timeout or broken/no connection on telegram update, sleep %ds\n"\ + "$(date)" "$((nextsleep))e-3" >>"${ERRORLOG}" fi done }