mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-26 23:12:48 -05:00
Improve handling of disconnected Streamdelay server
This commit is contained in:
@@ -36,8 +36,13 @@ export default class StreamdelayClient extends EventEmitter {
|
||||
}
|
||||
|
||||
emitState() {
|
||||
const isConnected = this.ws.readyState === WebSocket.OPEN
|
||||
if (isConnected && !this.status) {
|
||||
// Wait until we've received the first status message
|
||||
return
|
||||
}
|
||||
this.emit('state', {
|
||||
isConnected: this.ws.readyState === WebSocket.OPEN,
|
||||
isConnected,
|
||||
...this.status,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user