Make sure server stops in 5 seconds tops
Now we have the SIGALRM trick inplace, but Event.wait() masks all signals
in some Python versions, so that won't do. Using a timeout allows signals
to be processed, so if the event wasn't set within 5 seconds the program
will now end no matter what.