Skip to content
Snippets Groups Projects
Commit e5b238e0 authored by Christof Schulze's avatar Christof Schulze
Browse files

gluon-mesh-babel: exit with error if unable to connect to babeld

parent 89b7612f
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment