From 63be4ecb791ef36baa4656f6c88b125b2b8d9024 Mon Sep 17 00:00:00 2001 From: Joshua Blum Date: Mon, 2 Nov 2026 15:00:45 -0500 Subject: [PATCH] drop cancel messages instead of emitting warnings --- lib/dispatch.js | 7 ++++++- src/dispatch.iced | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/dispatch.js b/lib/dispatch.js index 166556b..b58f8f7 100644 --- a/lib/dispatch.js +++ b/lib/dispatch.js @@ -100,6 +100,8 @@ Dispatch.prototype.NOTIFY = 2; + Dispatch.prototype.CANCEL = 3; + Dispatch.prototype.INVOKE_COMPRESSED = 4; function Dispatch() { @@ -155,6 +157,9 @@ param: param, response: response }); + case this.CANCEL: + seqid = msg[0], method = msg[1]; + break; default: return this._warn("Unknown message type: " + type); } @@ -269,7 +274,7 @@ return result = arguments[1]; }; })(), - lineno: 191 + lineno: 195 }); __iced_deferrals._fulfill(); })(function() { diff --git a/src/dispatch.iced b/src/dispatch.iced index d825c07..778dacd 100644 --- a/src/dispatch.iced +++ b/src/dispatch.iced @@ -62,7 +62,7 @@ exports.Dispatch = class Dispatch extends Packetizer INVOKE : 0 RESPONSE : 1 NOTIFY : 2 - # CANCEL : 3, not implemented + CANCEL : 3 INVOKE_COMPRESSED : 4 ##----------------------------------------- @@ -104,6 +104,10 @@ exports.Dispatch = class Dispatch extends Packetizer param = uncompress ctype, param response = new Response @, seqid, ctype @_serve { method, param, response } + when @CANCEL + # Server-side cancellation is not implemented; parse and drop the message. + [seqid,method] = msg + return else @_warn "Unknown message type: #{type}"