-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
It would be useful to have an attribute for the ability to auto reconnect in case of a failed connection.
Currently I'm using this code to try reconnecting in 3s intervals:
_handleWsClose: function(e) {
var i = setInterval(function() {
if(this.wsStatus === 0) {
clearInterval(i);
} else {
this.$.socket.close();
this.$.socket.open();
}
}.bind(this), 3000);
},But I think it would be useful to have this in the element.
So there could be an attribute for the auto reconnect interval, the default could be null so that it won't auto reconnect by default, only when the attribute is given.
E.g. it could be reconnect-interval="3000"
Reactions are currently unavailable