From 0085ff740dbf5b5758033499845e5719224e980d Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 25 Aug 2024 10:57:37 +0200 Subject: [PATCH] Change reqerrhandler placeholder to emitting clientError event on the server. --- src/middleware/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/middleware/core.js b/src/middleware/core.js index 4a4df4d..94b5ccc 100644 --- a/src/middleware/core.js +++ b/src/middleware/core.js @@ -100,8 +100,8 @@ module.exports = (req, res, logFacilities, config, next) => { 'Either ":path" or ":method" pseudoheader is missing.', ); if (Buffer.alloc) err.rawPacket = Buffer.alloc(0); - return; - // TODO: reqerrhandler(err, req.socket, fromMain); + if (req.socket && req.socket.server) + req.socket.server.emit("clientError", err, req.socket); } }