Diff

net/websocket.lua @ 10112:b327f2870382

net.*: Remove tostring call from logging Taken care of by loggingmanager now
author Kim Alvefur <zash@zash.se>
date Tue, 30 Jul 2019 02:35:17 +0200
parent 8893:eb710675f7f8
child 10113:66a9bc2d5c8d
line wrap: on
line diff
--- 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