(minor) typo fix: timeout variable

timeout variable was inconsistently spelled in helper function

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2021-07-19 13:23:12 -06:00
parent 20c9f74c77
commit c622c7f2a9

View File

@ -442,10 +442,10 @@ function random_string() {
function wait_for_port() {
local host=$1 # Probably "localhost"
local port=$2 # Numeric port
local timeout=${3:-5} # Optional; default to 5 seconds
local _timeout=${3:-5} # Optional; default to 5 seconds
# Wait
while [ $timeout -gt 0 ]; do
while [ $_timeout -gt 0 ]; do
{ exec 3<> /dev/tcp/$host/$port; } &>/dev/null && return
sleep 1
_timeout=$(( $_timeout - 1 ))