Fixed race condition issue causing a disconnect in the middle of a reconnect