Skip to content

changing the timeout duration doesn't seem to work #40

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

Closed
theweiweiway opened this issue Nov 3, 2019 · 1 comment
Closed

changing the timeout duration doesn't seem to work #40

theweiweiway opened this issue Nov 3, 2019 · 1 comment

Comments

@theweiweiway
Copy link

Hi,

I'm trying to change the timeout to 1000 from the default setting of 20000. Here's my code:

socket = IO.io('https://www.honeybeehub.ca/chat', <String, dynamic>{
      'timeout': 1000,
      'reconnectDelay': 3000,
      'query': {
        'token': accessToken,
      },
      'transports': ['websocket'],
      'upgrade': false,
      'reconnection': true
 });

socket.on('connect_error', (data) {
      print('reconnecting');
});

Everything else with my socket is working perfect. It's just that the timeout is not. Thanks

@theweiweiway theweiweiway changed the title timeout doesn't seem to work changing the timeout duration doesn't seem to work Nov 3, 2019
@jumperchen jumperchen added the bug label Dec 4, 2019
@jumperchen
Copy link
Member

From my test, it does work once the server has not sent the first handshake response during the timeout duration. Otherwise, the callback of the timeout will be cleanup as the same as Socket.io JS version.

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

No branches or pull requests

2 participants