From d2e8810d3cf7254583a3e1a5c5d9423a28e007ce Mon Sep 17 00:00:00 2001 From: Michael Disaro <15191694+michaeldisaro@users.noreply.github.com> Date: Mon, 17 Apr 2023 17:01:33 +0200 Subject: [PATCH] [#IOCOM-166] Fixed destroy handler with a NOOP (#37) --- src/IncomingMessage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IncomingMessage.ts b/src/IncomingMessage.ts index 965812d..fc5e733 100644 --- a/src/IncomingMessage.ts +++ b/src/IncomingMessage.ts @@ -73,8 +73,9 @@ export default class IncomingMessage extends Readable { ...req, // Inherit connection: createConnectionObject(context), context: sanitizeContext(context), // Specific to Azure Function + destroy: NOOP, // we are not interested in new destroy implementation headers: req.headers || {}, // Should always have a headers object - socket: { destroy: NOOP }, + socket: { destroy: NOOP }, // we should not destroy the socket // eslint-disable-next-line @typescript-eslint/no-explicit-any url: (req as any).originalUrl });