mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-30 15:00:26 +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
|
||||
default:
|
||||
this._log.warn(`unknown data event: ${event}`)
|
||||
return
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
if (typeof buffer !== 'undefined') {
|
||||
this._channel!.send(buffer)
|
||||
}
|
||||
this._channel!.send(buffer)
|
||||
}
|
||||
|
||||
// not-implemented
|
||||
|
@ -250,6 +248,7 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
|||
|
||||
if (this._statsStop && typeof this._statsStop === 'function') {
|
||||
this._statsStop()
|
||||
this._statsStop = undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
throw new Error('client not connected to websocket')
|
||||
}
|
||||
|
||||
this.websocket.disconnect()
|
||||
this.websocket.disconnect(new Error('manual action'))
|
||||
}
|
||||
|
||||
public webrtcConnect() {
|
||||
|
@ -361,7 +361,7 @@
|
|||
this.webrtc.disconnect()
|
||||
this.clearState()
|
||||
|
||||
// reconnect WebRTC
|
||||
// reconnect Websocket
|
||||
if (this.authenticated) {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue