mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-07 04:56:57 +00:00
reds: Use socket_close instead of close
socket_close is mapped to close under Unix but under Windows you should call closesocket instead so call socket_close which will map to the proper close function on both environments. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Uri Lublin <ulublin@redhat.com>
This commit is contained in:
parent
21323c8b6f
commit
8875e79c7c
@ -2470,8 +2470,7 @@ static void reds_accept_ssl_connection(int fd, int event, void *data)
|
||||
}
|
||||
|
||||
if (!(link = reds_init_client_ssl_connection(reds, socket))) {
|
||||
close(socket);
|
||||
return;
|
||||
socket_close(socket);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2486,8 +2485,9 @@ static void reds_accept(int fd, int event, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (spice_server_add_client(reds, socket, 0) < 0)
|
||||
close(socket);
|
||||
if (spice_server_add_client(reds, socket, 0) < 0) {
|
||||
socket_close(socket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user