core/s2smanager.lua

changeset 2877
1edeb8fe7d14
parent 2813
46dfcc33ea9e
parent 2858
d08771a2f617
child 2889
c1e6df7cf56a
--- 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;

mercurial