closeTransport method

Future<void> closeTransport(
  1. dynamic url
)

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");
    });
  }
}