lint
This commit is contained in:
parent
c8593a9668
commit
7b58a96ece
1 changed files with 10 additions and 4 deletions
|
|
@ -109,11 +109,16 @@ export const useStreamingStore = defineStore('streaming', {
|
|||
},
|
||||
initSocket(initial) {
|
||||
if (this.socket) {
|
||||
console.error("Socket already exists! This shouldn't happen! Force-closing the socket just in case")
|
||||
console.error(
|
||||
"Socket already exists! This shouldn't happen! Force-closing the socket just in case",
|
||||
)
|
||||
try {
|
||||
this.socket.close()
|
||||
this.socket.close()
|
||||
} catch (e) {
|
||||
console.error("Error closing existing socket that shouldn't be there. Welp. Moving on.", e)
|
||||
console.error(
|
||||
"Error closing existing socket that shouldn't be there. Welp. Moving on.",
|
||||
e,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +142,8 @@ export const useStreamingStore = defineStore('streaming', {
|
|||
this.socket.addEventListener('error', this.onError)
|
||||
},
|
||||
stopSocket() {
|
||||
if (this.socket == null) console.error("Socket is already stopped! This shouldn't happen!")
|
||||
if (this.socket == null)
|
||||
console.error("Socket is already stopped! This shouldn't happen!")
|
||||
this.socket?.close()
|
||||
this.socket = null
|
||||
this.state = WSConnectionStatus.CLOSED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue