Software /
code /
prosody
Comparison
util/session.lua @ 10110:3fa3872588a8
util.session: Remove tostring call from logging
Taken care of by loggingmanager now
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Jul 2019 02:24:06 +0200 |
parent | 9947:8ebca1240203 |
child | 12640:999b1c59af6f |
comparison
equal
deleted
inserted
replaced
10109:c59d384b0959 | 10110:3fa3872588a8 |
---|---|
29 | 29 |
30 local function set_send(session) | 30 local function set_send(session) |
31 local conn = session.conn; | 31 local conn = session.conn; |
32 if not conn then | 32 if not conn then |
33 function session.send(data) | 33 function session.send(data) |
34 session.log("debug", "Discarding data sent to unconnected session: %s", tostring(data)); | 34 session.log("debug", "Discarding data sent to unconnected session: %s", data); |
35 return false; | 35 return false; |
36 end | 36 end |
37 return session; | 37 return session; |
38 end | 38 end |
39 local filter = initialize_filters(session); | 39 local filter = initialize_filters(session); |
45 if t then | 45 if t then |
46 t = filter("bytes/out", tostring(t)); | 46 t = filter("bytes/out", tostring(t)); |
47 if t then | 47 if t then |
48 local ret, err = w(conn, t); | 48 local ret, err = w(conn, t); |
49 if not ret then | 49 if not ret then |
50 session.log("debug", "Error writing to connection: %s", tostring(err)); | 50 session.log("debug", "Error writing to connection: %s", err); |
51 return false, err; | 51 return false, err; |
52 end | 52 end |
53 end | 53 end |
54 end | 54 end |
55 return true; | 55 return true; |