closeTransport method
Implementation
Future<void> closeTransport(url) async {
NostrTransport? transport = transports[url];
if (transport != null) {
Logger.log.d("Disconnecting $url...");
transports.remove(url);
return transport.close().timeout(const Duration(seconds: 3),
onTimeout: () {
Logger.log.w("timeout while trying to close socket $url");
});
}
}