handleEOSE method

void handleEOSE(
  1. List eventJson,
  2. String url
)

Implementation

void handleEOSE(List<dynamic> eventJson, String url) {
  String id = eventJson[1];
  RequestState? state = globalState.inFlightRequests[id];
  if (state != null && state.request.closeOnEOSE) {
    Logger.log.t(
        "⛁ received EOSE from $url for REQ id $id, remaining requests from :${state.requests.keys} kind:${state.requests.values.first.filters.first.kinds}");
    RelayRequestState? request = state.requests[url];
    if (request != null) {
      request.receivedEOSE = true;
      closeIfAllEventsVerified(request, state, url);
    }
  }
  return;
}