Diff

core/s2smanager.lua @ 2877:1edeb8fe7d14

Merge 0.6.2/waqas with 0.6.2/MattJ
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Mar 2010 22:05:05 +0000
parent 2813:46dfcc33ea9e
parent 2858:d08771a2f617
child 2889:c1e6df7cf56a
line wrap: on
line diff
--- a/core/s2smanager.lua	Fri Feb 19 03:30:27 2010 +0000
+++ b/core/s2smanager.lua	Wed Mar 03 22:05:05 2010 +0000
@@ -504,6 +504,8 @@
 	end
 end
 
+local function null_data_handler(conn, data) log("debug", "Discarding data from destroyed s2s session: %s", data); end
+
 function destroy_session(session, reason)
 	(session.log or log)("info", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host));
 	
@@ -519,6 +521,7 @@
 			session[k] = nil;
 		end
 	end
+	session.data = null_data_handler;
 end
 
 return _M;