Reconnect events are triggered on the socket.io manager since v3

This commit is contained in:
Joachim Bauch 2021-11-22 11:55:38 +01:00
parent 41d22d5833
commit 9b55bdf0ea
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02

View file

@ -756,15 +756,15 @@ function Annotator(socketurl, id, userid, displayname, token) {
});
// Also allow polling connections when the connection was interrupted once
// (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'];
}.bind(this));
this.socket.io.on('reconnect', this.onReconnected.bind(this));
this.socket.on('message', this.onMessage.bind(this));
this.socket.on('user.joined', this.onUserJoined.bind(this));
this.socket.on('user.left', this.onUserLeft.bind(this));
this.socket.on('connect', this.onConnected.bind(this));
this.socket.on('disconnect', this.onDisconnect.bind(this));
this.socket.on('reconnect', this.onReconnected.bind(this));
this.colorPicker = new iro.ColorPicker("#colorPicker", {
width: 320,