core/s2smanager.lua

changeset 2621
4d0f9f50fdd8
parent 2613
afa20941e098
child 2622
5ced53147f86
--- a/core/s2smanager.lua	Fri Feb 12 15:05:48 2010 +0000
+++ b/core/s2smanager.lua	Fri Feb 12 17:14:54 2010 +0000
@@ -508,6 +508,8 @@
 	end
 end
 
+local function null_data_handler(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));
 	
@@ -523,6 +525,7 @@
 			session[k] = nil;
 		end
 	end
+	session.data = null_data_handler;
 end
 
 return _M;

mercurial