Skip to content

Commit

Permalink
Merge pull request #28 from mgorny/fix-tests-hang
Browse files Browse the repository at this point in the history
miniupnpc: fix killing the test server.
  • Loading branch information
miniupnp committed Feb 11, 2013
2 parents d50eaf3 + a3e8540 commit 496737b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions miniupnpc/testminiwget.sh
Expand Up @@ -39,6 +39,7 @@ esac

# launching the test HTTP server
./minihttptestserver $SERVERARGS -e $EXPECTEDFILE > $HTTPSERVEROUT &
SERVERPID=$!
while [ -z "$PORT" ]; do
sleep 1
PORT=`cat $HTTPSERVEROUT | sed 's/Listening on port \([0-9]*\)/\1/' `
Expand Down Expand Up @@ -77,8 +78,8 @@ else
fi

# kill the test HTTP server
kill %1
wait %1
kill $SERVERPID
wait $SERVERPID

# remove temporary files (for success cases)
if [ $RET -eq 0 ]; then
Expand Down

0 comments on commit 496737b

Please sign in to comment.