1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.websocket: remove unnecessary manual frees of static strings (#19009)

This commit is contained in:
Kim Shrier 2023-07-31 12:23:33 -06:00 committed by GitHub
parent 8861538c66
commit fd81bae361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
}