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

net.websocket: call close event (#17300)

This commit is contained in:
starryskye
2023-02-13 05:28:41 -07:00
committed by GitHub
parent 16344cfc28
commit 2d3508c872
2 changed files with 55 additions and 0 deletions

View File

@@ -337,6 +337,7 @@ pub fn (mut ws Client) close(code int, message string) ! {
defer {
ws.shutdown_socket() or {}
ws.reset_state() or {}
ws.send_close_event(code, message)
}
ws.set_state(.closing)
// mut code32 := 0