closeAllSockets static method

Future<int> closeAllSockets()

Implementation

static Future<int> closeAllSockets() async {
  var inactive = _closeInActiveSockets();

  int all = inactive;
  for (var e in _sockets.entries) {
    for (var s in e.value) {
      await s.ws.sink.close();
      all++;
    }
  }

  return all;
}