resetConnection method
Closes and clears only transport-scoped state of one connection, while keeping its entry and relay-scoped metadata in memory.
Implementation
Future<void> resetConnection(RelayConnectionKey key) async {
final connectivity = globalState.relays[key];
if (connectivity != null) {
Logger.log.d(() => "Resetting transport for $key...");
connectivity.relay.failedToConnect();
_forgetAuthState(key);
await connectivity.close();
_endAuthRetriesLeftBehind(key);
updateRelayConnectivity();
}
}