Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangmy21 authored May 7, 2024
1 parent dcf1e10 commit 12add90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dependency/shell/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ function retry_command {
sleep $sleep_seconds

if kill -0 $PID 2>/dev/null; then
echo "Connected to server successfully."
return 0
else
echo "Failed to connect to server. Retrying..."
((attempt_num++))
else
echo "Connected to server successfully."
return 0
fi
done

Expand Down Expand Up @@ -106,6 +106,7 @@ if [ "$TERMINAL" = "SERVER" ]; then
finish_payload='{"result": {"status": "Crashed", "scores": [0, 0]}}'
curl $FINISH_URL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d "${finish_payload}" > $playback_dir/send.log 2>&1
else
echo "Game is started."
ps -p $server_pid
while [ $? -eq 0 ]
do
Expand Down

0 comments on commit 12add90

Please sign in to comment.