remove method

SessionRoute? remove(
  1. SessionId sessionId
)

Removes and returns the route with sessionId, if present.

Implementation

SessionRoute? remove(SessionId sessionId) {
  final route = _bySession.remove(sessionId.value);
  if (route != null) {
    _byClient.remove(_key(route.client.id, route.clientChannel));
    _byNode.remove(_key(route.node.id, route.nodeChannel));
  }
  return route;
}