Fix a crash if avahi restarts while we're running.