discontinuedPackage is_journal has been discontinued and replaced by is_logbook.

close method

Future<void> close()

Stops listening, ends its subscribers, removes the sockets and closes the journal.

Implementation

Future<void> close() async {
  await _server.close();
  await _readServer?.close();
  for (final subscriber in _subscribers.toList()) {
    subscriber.socket.destroy();
  }
  _subscribers.clear();
  for (final socket in [_socket, ?_readSocket]) {
    if (socket.existsSync()) socket.deleteSync();
  }
  journal.close();
}