resetState method
Resets the state such that a resumption is no longer possible without creating a new session. Primarily useful for clearing the state after disconnecting
Implementation
Future<void> resetState() async {
await setState(
_state.copyWith(
c2s: 0,
s2c: 0,
streamResumptionLocation: null,
streamResumptionId: null,
),
);
await _ackLock.synchronized(() async {
_pendingAcks = 0;
});
}