close method

Future<void> close()

Implementation

Future<void> close() async {
  for (String key in _subs.keys.toList()) {
    _subs[key]!._done();
    _subs.remove(key);
  }

  if (server != null) {
    await server!.close(force: true);
    server = null;
  }
}