Skip to content

Commit

Permalink
fix: uses timeout in nc as it is used with wget (#42)
Browse files Browse the repository at this point in the history
Add -w 1 option to nc.
  • Loading branch information
tljm committed Apr 27, 2021
1 parent 2193507 commit 0195167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wait-for
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ wait_for() {
while :; do
case "$PROTOCOL" in
tcp)
nc -z "$HOST" "$PORT" > /dev/null 2>&1
nc -w 1 -z "$HOST" "$PORT" > /dev/null 2>&1
;;
http)
wget --timeout=1 -q "$HOST" -O /dev/null > /dev/null 2>&1
Expand Down

0 comments on commit 0195167

Please sign in to comment.