aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-03-02 16:28:11 +0100
committerKim Alvefur <zash@zash.se>2016-03-02 16:28:11 +0100
commit4ad9454756938fc56e73a3876fa07695cf34220c (patch)
tree2404647768b3732f5c477363d5d04cdc2785728e /plugins/mod_c2s.lua
parent1370ab3c3a9a130e763149446ac4af6160a6cfc1 (diff)
downloadprosody-4ad9454756938fc56e73a3876fa07695cf34220c.tar.gz
prosody-4ad9454756938fc56e73a3876fa07695cf34220c.zip
mod_c2s: Remove connection object from session object when connection disconnected to prevent accidental use (see #590)
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r--plugins/mod_c2s.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 8524c37e..30a017c0 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -258,6 +258,7 @@ function listener.ondisconnect(conn, err)
if session then
(session.log or log)("info", "Client disconnected: %s", err or "connection closed");
sm_destroy_session(session, err);
+ session.conn = nil;
sessions[conn] = nil;
end
end