net.websocket: Fix log call to pass data via format string instead of concatenation
authorKim Alvefur <zash@zash.se>
Tue, 30 Jul 2019 02:35:28 +0200
changeset 10117 66a9bc2d5c8d
parent 10116 b327f2870382
child 10118 2f7628804db6
net.websocket: Fix log call to pass data via format string instead of concatenation
net/websocket.lua
--- a/net/websocket.lua	Tue Jul 30 02:35:17 2019 +0200
+++ b/net/websocket.lua	Tue Jul 30 02:35:28 2019 +0200
@@ -113,7 +113,7 @@
 				frame.MASK = true; -- RFC 6455 6.1.5: If the data is being sent by the client, the frame(s) MUST be masked
 				conn:write(frames.build(frame));
 			elseif frame.opcode == 0xA then -- Pong frame
-				log("debug", "Received unexpected pong frame: " .. tostring(frame.data));
+				log("debug", "Received unexpected pong frame: %s", frame.data);
 			else
 				return fail(s, 1002, "Reserved opcode");
 			end