Close method
Implementation
Future<void> Close() async {
await _lockObject.synchronized(() async {
ThrowIfDisposed();
ValidateConnectionState(
true,
"Strings.CannotCallDisconnectWithNoLiveConnection",
);
// Further down in the stack, this will result in a call to our OnRequestDisconnect event handler,
// doing the necessary cleanup.
await _currentHangingRequest?.Disconnect();
});
}