chore: add check for connection status before sending

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2023-12-05 09:31:46 +02:00
parent 7af9750ea8
commit 8fbabdc2cb
2 changed files with 6 additions and 1 deletions
@@ -206,6 +206,11 @@ export class SignalsService implements EventSubscriber {
) {
return;
}
if (conn.ws.readyState !== WebSocket.OPEN) {
return;
}
conn.ws.send(jsonMessage);
});