aboutsummaryrefslogtreecommitdiffstats
path: root/net/websocket.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/websocket.lua')
-rw-r--r--net/websocket.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/websocket.lua b/net/websocket.lua
index 469c6a58..bb26c100 100644
--- a/net/websocket.lua
+++ b/net/websocket.lua
@@ -131,7 +131,7 @@ end
function websocket_methods:close(code, reason)
if self.readyState < 2 then
code = code or 1000;
- log("debug", "closing WebSocket with code %i: %s" , code , tostring(reason));
+ log("debug", "closing WebSocket with code %i: %s" , code , reason);
self.readyState = 2;
local conn = self.conn;
conn:write(frames.build_close(code, reason, true));
@@ -245,7 +245,7 @@ local function connect(url, ex, listeners)
or (protocol and not protocol[r.headers["sec-websocket-protocol"]])
then
s.readyState = 3;
- log("warn", "WebSocket connection to %s failed: %s", url, tostring(b));
+ log("warn", "WebSocket connection to %s failed: %s", url, b);
if s.onerror then s:onerror("connecting-failed"); end
return;
end