mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge branch 'main' into 'main'
gsocket windows: check event before calling WSAEnumNetworkEvents See merge request GNOME/glib!4261
This commit is contained in:
commit
7a1c8d9ba3
@ -4107,9 +4107,8 @@ update_condition_unlocked (GSocket *socket)
|
|||||||
GIOCondition condition;
|
GIOCondition condition;
|
||||||
|
|
||||||
if (!socket->priv->closed &&
|
if (!socket->priv->closed &&
|
||||||
WSAEnumNetworkEvents (socket->priv->fd,
|
(WSAWaitForMultipleEvents (1, &socket->priv->event, FALSE, 0, FALSE) == WSA_WAIT_EVENT_0) &&
|
||||||
socket->priv->event,
|
(WSAEnumNetworkEvents (socket->priv->fd, socket->priv->event, &events) == 0))
|
||||||
&events) == 0)
|
|
||||||
{
|
{
|
||||||
socket->priv->current_events |= events.lNetworkEvents;
|
socket->priv->current_events |= events.lNetworkEvents;
|
||||||
if (events.lNetworkEvents & FD_WRITE &&
|
if (events.lNetworkEvents & FD_WRITE &&
|
||||||
|
Loading…
Reference in New Issue
Block a user