aboutsummaryrefslogtreecommitdiffstats
path: root/core/sessionmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-09-21 23:19:48 +0200
committerKim Alvefur <zash@zash.se>2015-09-21 23:19:48 +0200
commit4e24283711de37e3db92ebe0f93e26c55d516eda (patch)
treedac557561ff99ad287190f055409f202964ab963 /core/sessionmanager.lua
parent7cfa1513cc23bb7b305f2607581c7fece4c2bf95 (diff)
downloadprosody-4e24283711de37e3db92ebe0f93e26c55d516eda.tar.gz
prosody-4e24283711de37e3db92ebe0f93e26c55d516eda.zip
sessionmanager: Make session.send() return true unless there really is an error
Diffstat (limited to 'core/sessionmanager.lua')
-rw-r--r--core/sessionmanager.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 616f38a8..bc4d7cef 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -37,9 +37,15 @@ local function new_session(conn)
if t then
t = filter("bytes/out", tostring(t));
if t then
- return w(conn, t);
+ local ret, err = w(conn, t);
+ if not ret then
+ session.log("error", "Write-error: %s", tostring(err));
+ return false;
+ end
+ return true;
end
end
+ return true;
end
session.ip = conn:ip();
local conn_name = "c2s"..tostring(session):match("[a-f0-9]+$");