Fix raid rejoin

stoppedEvent is not set when the thread is exiting due to app exit,
which makes rejoin fire and interrupt the exit.