mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-31 07:19:06 +02:00
minor WS &WebRTC fixes.
This commit is contained in:
parent
b6d61c0748
commit
85a3f4fd9d
2 changed files with 5 additions and 6 deletions
|
@ -207,12 +207,10 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this._log.warn(`unknown data event: ${event}`)
|
this._log.warn(`unknown data event: ${event}`)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
this._channel!.send(buffer)
|
||||||
if (typeof buffer !== 'undefined') {
|
|
||||||
this._channel!.send(buffer)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// not-implemented
|
// not-implemented
|
||||||
|
@ -250,6 +248,7 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||||
|
|
||||||
if (this._statsStop && typeof this._statsStop === 'function') {
|
if (this._statsStop && typeof this._statsStop === 'function') {
|
||||||
this._statsStop()
|
this._statsStop()
|
||||||
|
this._statsStop = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
throw new Error('client not connected to websocket')
|
throw new Error('client not connected to websocket')
|
||||||
}
|
}
|
||||||
|
|
||||||
this.websocket.disconnect()
|
this.websocket.disconnect(new Error('manual action'))
|
||||||
}
|
}
|
||||||
|
|
||||||
public webrtcConnect() {
|
public webrtcConnect() {
|
||||||
|
@ -361,7 +361,7 @@
|
||||||
this.webrtc.disconnect()
|
this.webrtc.disconnect()
|
||||||
this.clearState()
|
this.clearState()
|
||||||
|
|
||||||
// reconnect WebRTC
|
// reconnect Websocket
|
||||||
if (this.authenticated) {
|
if (this.authenticated) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue