Comparison

core/sessionmanager.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 569:5216efe6088b
child 597:e33d384e1b2e
comparison
equal deleted inserted replaced
582:8eb45a8099c4 583:5821eaa80baa
50 50
51 function new_session(conn) 51 function new_session(conn)
52 local session = { conn = conn, priority = 0, type = "c2s_unauthed", conntime = gettime() }; 52 local session = { conn = conn, priority = 0, type = "c2s_unauthed", conntime = gettime() };
53 if true then 53 if true then
54 session.trace = newproxy(true); 54 session.trace = newproxy(true);
55 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; print("Session got collected, now "..open_sessions.." sessions are allocated") end; 55 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end;
56 end 56 end
57 open_sessions = open_sessions + 1; 57 open_sessions = open_sessions + 1;
58 log("info", "open sessions now: ".. open_sessions); 58 log("info", "open sessions now: ".. open_sessions);
59 local w = conn.write; 59 local w = conn.write;
60 session.send = function (t) w(tostring(t)); end 60 session.send = function (t) w(tostring(t)); end