aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/httpserver.lua2
-rw-r--r--net/xmppclient_listener.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua
index af23a91d..8ce25f35 100644
--- a/net/httpserver.lua
+++ b/net/httpserver.lua
@@ -52,7 +52,7 @@ local function send_response(request, response)
end
else
-- Response we have is just a string (the body)
- log("debug", "Sending response to %s: %s", request.id, response);
+ log("debug", "Sending response to %s: %s", request.id or "<none>", response or "<none>");
resp = { "HTTP/1.0 200 OK\r\n" };
t_insert(resp, "Connection: close\r\n");
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index 617f0467..5e1a1ba3 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -95,7 +95,7 @@ local function session_close(session, reason)
end
session.send("</stream:stream>");
session.conn.close();
- xmppclient.disconnect(session.conn, "stream error");
+ xmppclient.disconnect(session.conn, reason.condition or reason or "session closed");
end
end
@@ -136,7 +136,7 @@ function xmppclient.disconnect(conn, err)
local session = sessions[conn];
if session then
(session.log or log)("info", "Client disconnected: %s", err);
- sm_destroy_session(session);
+ sm_destroy_session(session, err);
sessions[conn] = nil;
session = nil;
collectgarbage("collect");