Comparison

core/s2smanager.lua @ 583:5821eaa80baa

Remove print()s from sessionmanager and s2smanager
author Matthew Wild <mwild1@gmail.com>
date Sat, 06 Dec 2008 23:14:39 +0000
parent 559:fa4a51fe6442
child 593:121d82243023
comparison
equal deleted inserted replaced
582:8eb45a8099c4 583:5821eaa80baa
92 92
93 function new_incoming(conn) 93 function new_incoming(conn)
94 local session = { conn = conn, type = "s2sin_unauthed", direction = "incoming" }; 94 local session = { conn = conn, type = "s2sin_unauthed", direction = "incoming" };
95 if true then 95 if true then
96 session.trace = newproxy(true); 96 session.trace = newproxy(true);
97 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; print("s2s session got collected, now "..open_sessions.." s2s sessions are allocated") end; 97 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end;
98 end 98 end
99 open_sessions = open_sessions + 1; 99 open_sessions = open_sessions + 1;
100 local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$")); 100 local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$"));
101 session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end 101 session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end
102 return session; 102 return session;