Skip to content

Commit b15c461

Browse files
authored
fix: wget in alpine runs into an endless retry loop (#100)
1 parent b29602e commit b15c461

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wait-for

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ wait_for() {
6868

6969
while :; do
7070
case "$PROTOCOL" in
71-
tcp)
71+
tcp)
7272
nc -w 1 -z "$HOST" "$PORT" > /dev/null 2>&1
7373
;;
7474
http)
75-
wget --timeout=1 -q "$HOST" -O /dev/null > /dev/null 2>&1
75+
wget --timeout=1 --tries=1 -q "$HOST" -O /dev/null > /dev/null 2>&1
7676
;;
7777
*)
7878
echoerr "Unknown protocol '$PROTOCOL'"
@@ -81,7 +81,7 @@ wait_for() {
8181
esac
8282

8383
result=$?
84-
84+
8585
if [ $result -eq 0 ] ; then
8686
if [ $# -gt 7 ] ; then
8787
for result in $(seq $(($# - 7))); do

0 commit comments

Comments
 (0)