diff options
author | Kim Alvefur <zash@zash.se> | 2015-09-21 23:19:48 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-09-21 23:19:48 +0200 |
commit | dfa152b3841ec3fc1303eb3e03874960eeb924c6 (patch) | |
tree | d858b5215395c3cf36135daf61a71a99afb64098 | |
parent | 9482aaf11dfc7db55f4e0d3e0b3378ad4316138f (diff) | |
download | prosody-dfa152b3841ec3fc1303eb3e03874960eeb924c6.tar.gz prosody-dfa152b3841ec3fc1303eb3e03874960eeb924c6.zip |
sessionmanager: Make session.send() return true unless there really is an error [backported from 0.10]
-rw-r--r-- | core/sessionmanager.lua | 8 |
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]+$"); |