fix(websocket): close websocket before connecting (#383)

This commit is contained in:
goesta
2021-10-20 15:23:02 +02:00
committed by GitHub
parent 62ccb1f97d
commit 182d7f146e

View File

@@ -33,6 +33,10 @@ export class WebSocketClient {
connect(): void {
this.store?.dispatch('socket/setData', { isConnecting: true })
if (this.instance) {
this.instance.close()
}
this.instance = new WebSocket(this.url)
this.instance.onopen = () => {