mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
net.websocket: call close event (#17300)
This commit is contained in:
parent
16344cfc28
commit
2d3508c872
2 changed files with 55 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue