fix(websocket): close websocket before connecting (#383)
This commit is contained in:
@@ -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 = () => {
|
||||
|
Reference in New Issue
Block a user