Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Sioconnector error #956

Open
frabaglia opened this issue May 30, 2017 · 0 comments
Open

Sioconnector error #956

frabaglia opened this issue May 30, 2017 · 0 comments

Comments

@frabaglia
Copy link

frabaglia commented May 30, 2017

The pomelo socket.io connector is throwing errors trying to connect from another node.js server, using socket.io-client.

Actually i found that:
https://github.com/NetEase/pomelo/blob/master/lib/connectors/sioconnector.js#L59

It's a deprecated method, as you can see on:
https://socket.io/docs/migrating-from-0-9/

The old io.set() and io.get() methods are deprecated and only supported for backwards compatibility. Here is a translation of an old authorization example into middleware-style.

EDIT#1:

I decided to try fixing this, we remove all this configs:

this.wsocket.set('close timeout', this.closeTimeout);
this.wsocket.set('heartbeat timeout', this.heartbeatTimeout);
this.wsocket.set('heartbeat interval', this.heartbeatInterval);
this.wsocket.set('heartbeats', this.heartbeats);
this.wsocket.set('log level', 1);

And added on the listen connection options:

this.wsocket = sio.listen(this.port, {
     transports: ['websocket', 'htmlfile', 'xhr-polling', 'jsonp-polling', 'flashsocket'],
     pingTimeout : this.heartbeatTimeout,
     pingInterval : this.heartbeatInterval
  });
}

Actually trying with this new setup and will be sending updates.

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

No branches or pull requests

1 participant