Comparison

core/sessionmanager.lua @ 10105:63f87211fcdd

core.sessionmanager: Remove tostring call from logging Taken care of by loggingmanager now
author Kim Alvefur <zash@zash.se>
date Tue, 30 Jul 2019 02:19:27 +0200
parent 10043:ce8e18f20693
child 10372:5482f21a18a2
comparison
equal deleted inserted replaced
10104:3965081809ba 10105:63f87211fcdd
42 function session.rawsend(t) 42 function session.rawsend(t)
43 t = filter("bytes/out", tostring(t)); 43 t = filter("bytes/out", tostring(t));
44 if t then 44 if t then
45 local ret, err = w(conn, t); 45 local ret, err = w(conn, t);
46 if not ret then 46 if not ret then
47 session.log("debug", "Error writing to connection: %s", tostring(err)); 47 session.log("debug", "Error writing to connection: %s", err);
48 return false, err; 48 return false, err;
49 end 49 end
50 end 50 end
51 return true; 51 return true;
52 end 52 end
83 if k ~= "log" and k ~= "id" then 83 if k ~= "log" and k ~= "id" then
84 session[k] = nil; 84 session[k] = nil;
85 end 85 end
86 end 86 end
87 87
88 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); return false; end 88 function session.send(data) log("debug", "Discarding data sent to resting session: %s", data); return false; end
89 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end 89 function session.data(data) log("debug", "Discarding data received from resting session: %s", data); end
90 session.thread = { run = function (_, data) return session.data(data) end }; 90 session.thread = { run = function (_, data) return session.data(data) end };
91 return setmetatable(session, resting_session); 91 return setmetatable(session, resting_session);
92 end 92 end
93 93
94 local function destroy_session(session, err) 94 local function destroy_session(session, err)