Reconnect events are triggered on the socket.io manager since v3
This commit is contained in:
parent
41d22d5833
commit
9b55bdf0ea
1 changed files with 2 additions and 2 deletions
|
|
@ -756,15 +756,15 @@ function Annotator(socketurl, id, userid, displayname, token) {
|
||||||
});
|
});
|
||||||
// Also allow polling connections when the connection was interrupted once
|
// Also allow polling connections when the connection was interrupted once
|
||||||
// (could be caused by proxy / firewall).
|
// (could be caused by proxy / firewall).
|
||||||
this.socket.on('reconnect_attempt', function() {
|
this.socket.io.on('reconnect_attempt', function() {
|
||||||
this.socket.io.opts.transports = ['polling', 'websocket'];
|
this.socket.io.opts.transports = ['polling', 'websocket'];
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
this.socket.io.on('reconnect', this.onReconnected.bind(this));
|
||||||
this.socket.on('message', this.onMessage.bind(this));
|
this.socket.on('message', this.onMessage.bind(this));
|
||||||
this.socket.on('user.joined', this.onUserJoined.bind(this));
|
this.socket.on('user.joined', this.onUserJoined.bind(this));
|
||||||
this.socket.on('user.left', this.onUserLeft.bind(this));
|
this.socket.on('user.left', this.onUserLeft.bind(this));
|
||||||
this.socket.on('connect', this.onConnected.bind(this));
|
this.socket.on('connect', this.onConnected.bind(this));
|
||||||
this.socket.on('disconnect', this.onDisconnect.bind(this));
|
this.socket.on('disconnect', this.onDisconnect.bind(this));
|
||||||
this.socket.on('reconnect', this.onReconnected.bind(this));
|
|
||||||
|
|
||||||
this.colorPicker = new iro.ColorPicker("#colorPicker", {
|
this.colorPicker = new iro.ColorPicker("#colorPicker", {
|
||||||
width: 320,
|
width: 320,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue