From fd81bae3611a4a930e9d10061c5f42c5f9d1e9df Mon Sep 17 00:00:00 2001 From: Kim Shrier Date: Mon, 31 Jul 2023 12:23:33 -0600 Subject: [PATCH] net.websocket: remove unnecessary manual frees of static strings (#19009) --- vlib/net/websocket/websocket_client.v | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vlib/net/websocket/websocket_client.v b/vlib/net/websocket/websocket_client.v index c4e30055c3..7a69f6f078 100644 --- a/vlib/net/websocket/websocket_client.v +++ b/vlib/net/websocket/websocket_client.v @@ -150,9 +150,7 @@ pub fn (mut ws Client) listen() ! { ws.debug_log('got message: ${msg.opcode}') match msg.opcode { .text_frame { - log_msg = 'read: text' - ws.debug_log(log_msg) - unsafe { log_msg.free() } + ws.debug_log('read: text') ws.send_message_event(msg) unsafe { msg.free() } } @@ -184,9 +182,7 @@ pub fn (mut ws Client) listen() ! { } } .close { - log_msg = 'read: close' - ws.debug_log(log_msg) - unsafe { log_msg.free() } + ws.debug_log('read: close') defer { ws.manage_clean_close() }