Set whether a reconnection attempt should be made.
Future<void> setShouldReconnect(bool value) async { return _lock.synchronized(() => _shouldAttemptReconnection = value); }