removeInFlightRequestById method

Future<void> removeInFlightRequestById(
  1. String id
)

removes a request from the inFlightRequests
and closes the network controller

Implementation

Future<void> removeInFlightRequestById(String id) async {
  RequestState? state = globalState.inFlightRequests[id];
  if (state != null) {
    try {
      await state.close();
    } catch (e) {
      Logger.log.e(e);
    }
    globalState.inFlightRequests.remove(id);
  }
  _logActiveRequests();
}