g_object_unref (socket);
if (winsock_source->cancellable)
- g_object_unref (winsock_source->cancellable);
+ {
+ g_cancellable_release_fd (winsock_source->cancellable);
+ g_object_unref (winsock_source->cancellable);
+ }
}
static GSourceFuncs winsock_funcs =
current_condition = update_condition (socket);
}
remove_condition_watch (socket, &condition);
+ if (num_events > 1)
+ g_cancellable_release_fd (cancellable);
return (condition & current_condition) != 0;
}
do
result = g_poll (poll_fd, num, -1);
while (result == -1 && get_socket_errno () == EINTR);
+
+ if (num > 1)
+ g_cancellable_release_fd (cancellable);
return cancellable == NULL ||
!g_cancellable_set_error_if_cancelled (cancellable, error);
do
poll_ret = g_poll (poll_fds, 2, -1);
while (poll_ret == -1 && errno == EINTR);
-
+ g_cancellable_release_fd (cancellable);
+
if (poll_ret == -1)
{
int errsv = errno;
do
poll_ret = g_poll (poll_fds, 2, -1);
while (poll_ret == -1 && errno == EINTR);
+ g_cancellable_release_fd (cancellable);
if (poll_ret == -1)
{