gluon-mesh-babel: exit with error if unable to connect to babeld
This commit is contained in:
parent
89b7612fdb
commit
e5b238e04a
@ -22,11 +22,15 @@ start_service() {
|
||||
echotobabel() {
|
||||
local count=0
|
||||
local line="$1"
|
||||
local maxretries=10
|
||||
while ! (echo -e "$line" | busybox nc ::1 "$PORT" >/dev/null 2>&1)
|
||||
do
|
||||
sleep 1
|
||||
echo retrying to connect to babeld in PID $$, waited ${count}s >&2
|
||||
count=$((count+1))
|
||||
if [ $count -gt $maxretries ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user