The ReplaySender used to be started in async mode even before the call to setup(). If the ReplaySender restarts the replay before the setup() call finishes, that call may instead produce a NPE in clientToServerHandshake(). To fix this race condition, the ReplaySender is always started in sync mode and only switched to async after the setup() call.