Changeset

897:844b6ef5d4c4

mod_bidi: Disassociate bidi and original session when they are destroyed
author Kim Alvefur <zash@zash.se>
date Wed, 16 Jan 2013 08:33:20 +0100
parents 896:d24d87ca3f5f
children 898:4aa473216432
files mod_bidi/mod_bidi.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_bidi/mod_bidi.lua	Wed Jan 16 02:27:49 2013 +0100
+++ b/mod_bidi/mod_bidi.lua	Wed Jan 16 08:33:20 2013 +0100
@@ -112,12 +112,12 @@
 	local session = event.session;
 	if session.bidi_session then
 		local bidi_session = session.bidi_session;
-		session.bidi_session = nil;
+		session.bidi_session, bidi_session.orig_session = nil, nil;
 		session.log("debug", "Tearing down bidirectional stream");
 		s2smanager.destroy_session(bidi_session, event.reason);
 	elseif session.orig_session then
 		local orig_session = session.orig_session;
-		session.orig_session = nil;
+		orig_session.bidi_session, session.orig_session = nil, nil;
 		orig_session.log("debug", "Tearing down bidirectional stream");
 		s2smanager.destroy_session(orig_session, event.reason);
 	end