From 68fe0fb79884e50ff10a3834d89464eafc0a25f7 Mon Sep 17 00:00:00 2001 From: David Ventura Date: Thu, 2 May 2024 13:18:15 +0200 Subject: [PATCH] warn on unhandled stream packets --- handlers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handlers.ts b/handlers.ts index 179b184..b9a580d 100644 --- a/handlers.ts +++ b/handlers.ts @@ -241,8 +241,10 @@ export const handle_Drw = (session: Session, dv: DataView) => { const m_stream = dv.add(5).readU8(); // data = 1, control = 0 if (m_stream == 1) { deal_with_data(session, dv); - } else { + } else if (m_stream == 0) { const b = createResponseForControlCommand(session, dv); b.forEach(session.send); + } else { + logger.warning(`Received a Drw packet with stream tag: ${m_stream}, which is not implemented`); } };