From: Kim Alvefur Date: Mon, 21 Sep 2015 21:19:48 +0000 (+0200) Subject: sessionmanager: Make session.send() return true unless there really is an error ... X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=8551bf5a2ae3d1c8bc47f052f531902fe4f0d919;p=prosody.git sessionmanager: Make session.send() return true unless there really is an error [backported from 0.10] --- 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]+$");