mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ws: handle close on client quit (#6776)
This commit is contained in:
parent
3c83551dfe
commit
ba366b126f
@ -109,6 +109,7 @@ pub fn (mut ws Client) listen() ? {
|
||||
ws.logger.info('Starting client listener, server($ws.is_server)...')
|
||||
defer {
|
||||
ws.logger.info('Quit client listener, server($ws.is_server)...')
|
||||
ws.close(1000, 'closed by client')
|
||||
}
|
||||
for ws.state == .open {
|
||||
msg := ws.read_next_message() or {
|
||||
|
Loading…
Reference in New Issue
Block a user