Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I control the timeout for connect to offline server url ? #19

Open
ghost opened this issue Sep 28, 2019 · 2 comments
Open

Can I control the timeout for connect to offline server url ? #19

ghost opened this issue Sep 28, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 28, 2019

When server is offline status , hubConnection.start() method need very long time for wait . about 90+ seconds, Can I set timeout param for a connect ?

@z-tc
Copy link

z-tc commented Oct 15, 2020

what is the status of this issue? it affects reconnecting to hub...
thanks?

@ascott18
Copy link

This project seems abandoned, but you can do this if you don't need to support browsers (also, you can switch to https://pub.dev/packages/signalr_core which seems to be a non-abandoned fork):

    final httpOptions = new HttpConnectionOptions(
      client: IOClient(HttpClient()..connectionTimeout = Duration(seconds: 5)),
    );

    final hubConnection = _hubConnection = HubConnectionBuilder()
        .withUrl(url, httpOptions)
        .withAutomaticReconnect()
        .build();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants