From a5750dda2af8ec17d36532416d15e6ee3f29d58a Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Thu, 7 May 2015 17:15:14 +0000 Subject: [PATCH] Tidy up try_connect function --- test/gce.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/gce.sh b/test/gce.sh index 0a42948a..823a76b4 100755 --- a/test/gce.sh +++ b/test/gce.sh @@ -45,10 +45,9 @@ function internal_ip { } function try_connect { - for i in $(seq 0 10); do - if ssh -t $1 true; then - return - fi + for i in {0..10}; do + ssh -t $1 true && return + sleep 2 done }