Software /
code /
prosody
Diff
plugins/mod_c2s.lua @ 7221:56e65b1e54e8
mod_c2s: Remove connection object from session object when connection disconnected to prevent accidental use (see #590)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 02 Mar 2016 16:28:11 +0100 |
parent | 7100:301d58705667 |
child | 7224:07a4c807a94a |
child | 7328:de76ded98b84 |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Thu Feb 25 22:36:42 2016 +0100 +++ b/plugins/mod_c2s.lua Wed Mar 02 16:28:11 2016 +0100 @@ -258,6 +258,7 @@ 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