From 366a13d95f528d6dba5e5ae05910fe6675c28df9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 21 Sep 2015 23:19:48 +0200 Subject: sessionmanager: Make session.send() return true unless there really is an error --- core/sessionmanager.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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]+$"); -- cgit v1.2.3