Fix the deadlock on startup if the user quits before the avahi thread is
running.