From 4f81aab3b78aa83c8b9e7a32a0530da6b7aee082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Esp=C3=ADn?= Date: Thu, 1 Apr 2021 15:18:22 +0200 Subject: [PATCH] Send the Request instance as second argument Send the Request instance as second argument to the connection event --- src/mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod.ts b/src/mod.ts index bac4744..6d409df 100644 --- a/src/mod.ts +++ b/src/mod.ts @@ -235,7 +235,7 @@ class Dropper extends EventEmitter { if (!c?._socket?.isClosed) c?._socket?.send(data_send) }) }) - const allowConnect = this.emit("connection", client); + const allowConnect = this.emit("connection", client, req); if (allowConnect !== undefined && !allowConnect) { await client.close(1002, "Access Denied"); }