some fixes for players syncing

This commit is contained in:
Zutatensuppe 2020-12-03 21:11:52 +01:00
parent e75cd7406f
commit 3d1a9ca9c7
5 changed files with 54 additions and 46 deletions

View file

@ -46,6 +46,11 @@ export default class WsWrapper {
ws.onmessage = (e) => {
this.onmessage(e)
}
ws.onerror = (e) => {
this.handle = null
this.reconnectTimeout = setTimeout(() => { this.connect() }, 1000)
this.onclose(e)
}
ws.onclose = (e) => {
this.handle = null
this.reconnectTimeout = setTimeout(() => { this.connect() }, 1000)