mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-05-29 08:20:52 +00:00
fix sleep on empty updatevresponse
This commit is contained in:
parent
848219d82c
commit
ec7fce72ac
|
@ -11,7 +11,7 @@
|
||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.96-pre-25-gf4c1657
|
#### $$VERSION$$ v0.96-pre-26-g848219d
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
|
@ -826,8 +826,9 @@ start_bot() {
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# ups, something bad happend, wait maxsleep
|
# ups, something bad happend, wait maxsleep
|
||||||
(( nextsleep=maxsleep ))
|
(( nextsleep=maxsleep*2 ))
|
||||||
printf "%s: Timeout or broken/no connection on telegram update, sleep %ds\n" "$(date)" $((nextsleep))e-3 >>"${ERRORLOG}"
|
printf "%s: Timeout or broken/no connection on telegram update, sleep %ds\n"\
|
||||||
|
"$(date)" "$((nextsleep))e-3" >>"${ERRORLOG}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user