Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.

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

@rajat-ventura

Description

@rajat-ventura

  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions