From 80cc76d531b3ecec03cef496459e139b36d7e044 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Fri, 13 Feb 2026 20:59:11 -0300 Subject: [PATCH] fix: Ensure server port is free before startup by killing existing processes. --- restart.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/restart.sh b/restart.sh index d81d548a2c..e2d0da0eaa 100755 --- a/restart.sh +++ b/restart.sh @@ -75,6 +75,10 @@ if [ $? -ne 0 ]; then fi echo "" +# Garante que a porta está livre antes de iniciar (build pode ter ocupado) +fuser -k $PORT/tcp 2>/dev/null +sleep 1 + echo "🚀 Iniciando servidor na porta $PORT..." LOG_FILE="/tmp/omniroute.log" > "$LOG_FILE"