net/websocket.lua
changeset 10116 b327f2870382
parent 8896 eb710675f7f8
child 10117 66a9bc2d5c8d
--- a/net/websocket.lua	Tue Jul 30 02:29:36 2019 +0200
+++ b/net/websocket.lua	Tue Jul 30 02:35:17 2019 +0200
@@ -131,7 +131,7 @@
 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 @@
 		   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