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
commit43b4d853780af81289d67b28fc0a333ce6dab887 (patch)
treed858b5215395c3cf36135daf61a71a99afb64098 /core/sessionmanager.lua
parent8368fb1935d99a2aa4ca2a9d57fb400ac9e9cd87 (diff)
downloadprosody-43b4d853780af81289d67b28fc0a333ce6dab887.tar.gz
prosody-43b4d853780af81289d67b28fc0a333ce6dab887.zip
sessionmanager: Make session.send() return true unless there really is an error [backported from 0.10]
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 4b014d18..67ceb739 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -37,9 +37,15 @@ 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("debug", "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]+$");