proper reconnect on ws error

This commit is contained in:
Thomas Rudin 2019-03-21 17:20:38 +01:00
parent 7d5d69684f
commit ad86d88cc6

View File

@ -44,6 +44,6 @@ WebSocketChannel.prototype.connect = function(){
ws.onerror = function(){
//reconnect after some time
setTimeout(connect, 1000);
setTimeout(() => this.connect(), 1000);
}
};