mirror of
https://github.com/tenrok/vue-native-websocket.git
synced 2026-06-07 07:22:25 +03:00
fix reconnection ws instance
This commit is contained in:
+4
-1
@@ -55,7 +55,10 @@ export default class {
|
||||
|
||||
if (this.store) { this.passToStore('SOCKET_' + eventType, event) }
|
||||
|
||||
if (this.reconnection && eventType === 'onopen') { this.reconnectionCount = 0 }
|
||||
if (this.reconnection && eventType === 'onopen') {
|
||||
this.opts.$setInstance(event.currentTarget)
|
||||
this.reconnectionCount = 0
|
||||
}
|
||||
|
||||
if (this.reconnection && eventType === 'onclose') { this.reconnect() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user