rhttp icon indicating copy to clipboard operation
rhttp copied to clipboard

I get RhttpClientDispsedException on switching networks on iOS and unable to reinitialize the client again instantly or within a few seconds

Open rajat-ventura opened this issue 1 year ago • 0 comments


  static init() async {
    // there will always be one HTTP client
    try {
      rCash = await RhttpCompatibleClient.create(
          interceptors: [TimeInterceptor()],
          settings: ClientSettings(
            httpVersionPref: HttpVersionPref.all,
            timeoutSettings: TimeoutSettings(
              timeout: Duration(seconds: 5),
              connectTimeout: Duration(seconds: 5),
              keepAliveTimeout: Duration(seconds: 5),
            ),
            throwOnStatusCode: false,
          )
      );
    } catch (e) {
      print("RHTTP RECONNECTION EXCEPTION");
      print(e.toString());
    }
  }


if(exception is RhttpClientDisposedException) {
      await HTTP3.init();
    } 

on getting the exception still the APICalls from rCash don't work. Please help

rajat-ventura avatar Feb 19 '25 19:02 rajat-ventura