aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_websocket.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index bddcbb79..f0caa968 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -63,6 +63,9 @@ end
local function session_close(session, reason)
local log = session.log or log;
+ local close_event_payload = { session = session, reason = reason };
+ module:context(session.host):fire_event("pre-session-close", close_event_payload);
+ reason = close_event_payload.reason;
if session.conn then
if session.notopen then
session:open_stream();