Readd sleep command when trying to start server

This commit is contained in:
Dirk Wetter
2026-09-06 13:06:43 +02:00
parent 17b806ecd3
commit d715595276
+2 -1
View File
@@ -60,7 +60,7 @@ fi
# Generate self-signed cert and key if they don't exist # Generate self-signed cert and key if they don't exist
if [ ! -f "$CERT" ] || [ ! -f "$KEY" ]; then if [ ! -f "$CERT" ] || [ ! -f "$KEY" ]; then
echo "Generating self-signed certificate and key..." echo "Generating self-signed certificate and key..."
$OPENSSL req -x509 -newkey rsa:2048 -keyout "$KEY" -out "$CERT" -days 42 -nodes -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,IP:127.0.0.1" >/dev/null 2>&1 $OPENSSL req -x509 -newkey rsa:2048 -keyout "$KEY" -out "$CERT" -days 42 -nodes -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,IP:127.0.0.1" >/dev/null
fi fi
# Start OpenSSL server # Start OpenSSL server
@@ -108,6 +108,7 @@ elsif ($pid > 0) {
close($socket); close($socket);
last; last;
} }
sleep 1;
} }
ok($ready, "Server is listening on $listenip:$port"); ok($ready, "Server is listening on $listenip:$port");