diff options
Diffstat (limited to 'io/channel-socket.c')
| -rw-r--r-- | io/channel-socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c index 7aca84f61a..b0ea7d48b3 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -442,9 +442,9 @@ static void qio_channel_socket_finalize(Object *obj) } } #ifdef WIN32 - WSAEventSelect(ioc->fd, NULL, 0); + qemu_socket_unselect(ioc->fd, NULL); #endif - closesocket(ioc->fd); + close(ioc->fd); ioc->fd = -1; } } @@ -846,13 +846,13 @@ qio_channel_socket_close(QIOChannel *ioc, if (sioc->fd != -1) { #ifdef WIN32 - WSAEventSelect(sioc->fd, NULL, 0); + qemu_socket_unselect(sioc->fd, NULL); #endif if (qio_channel_has_feature(ioc, QIO_CHANNEL_FEATURE_LISTEN)) { socket_listen_cleanup(sioc->fd, errp); } - if (closesocket(sioc->fd) < 0) { + if (close(sioc->fd) < 0) { sioc->fd = -1; error_setg_errno(&err, errno, "Unable to close socket"); error_propagate(errp, err); |