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

checker: turn the pointer map notice into a warning and fix all code using it

This commit is contained in:
Alexander Medvednikov
2023-01-15 22:19:16 +01:00
parent e8108f21e0
commit aba7bcde85
5 changed files with 19 additions and 14 deletions

View File

@ -83,7 +83,7 @@ fn (mut s Server) handle_ping() {
for s.state == .open {
time.sleep(s.ping_interval * time.second)
for i, _ in s.clients {
mut c := s.clients[i]
mut c := s.clients[i] or { continue }
if c.client.state == .open {
c.client.ping() or {
s.logger.debug('server-> error sending ping to client')
@ -125,7 +125,9 @@ fn (mut s Server) serve_client(mut c Client) ! {
// the client is accepted
c.socket_write(handshake_response.bytes())!
lock {
s.clients[server_client.client.id] = server_client
unsafe {
s.clients[server_client.client.id] = server_client
}
}
s.setup_callbacks(mut server_client)
c.listen() or {