MUC: Hide new MUC room storage format behind an off-by-default option
[prosody.git] / core / sessionmanager.lua
index 616f38a8d891dee85edd85f12c787fcce97348f9..6aa0a4f0f17d147a0b6d2930436ec3b5508084c8 100644 (file)
@@ -37,9 +37,14 @@ 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("debug", "Error writing to connection: %s", tostring(err));
+                                       return false, err;
+                               end
                        end
                end
+               return true;
        end
        session.ip = conn:ip();
        local conn_name = "c2s"..tostring(session):match("[a-f0-9]+$");