From 3895ea2988105d8b9130440900c9cb0c74edbf94 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Tue, 7 Sep 2021 22:57:50 +0100 Subject: [PATCH] Warn if sending message to missing bapsicle server. --- src/bapsicle.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bapsicle.ts b/src/bapsicle.ts index 9b0cd9e..e2440d5 100644 --- a/src/bapsicle.ts +++ b/src/bapsicle.ts @@ -151,6 +151,11 @@ export function sendBAPSicleChannel(message: any): void { message = JSON.stringify(message); console.log("Sending message to BAPSicle:", message); BAPSicleWS.send(message); + } else { + console.warn( + "Trying to send message without BAPSicle WS connection:", + message + ); } }