Always do async vs sync correctly in GSocketConnection streams

Previously if a GSocketConnection had a blocking GSocket, it would
sometimes block during asynchonous I/O, and if it had a non-blocking
socket, it would sometimes return G_IO_ERROR_WOULD_BLOCK from
synchronous I/O. This fixes the connection to not depend on the socket
state.

https://bugzilla.gnome.org/show_bug.cgi?id=616458
This commit is contained in:
Dan Winship
2010-06-24 13:09:14 -04:00
parent 17fea2f749
commit 547311bfd8
6 changed files with 101 additions and 18 deletions

View File

@@ -1716,9 +1716,11 @@ g_socket_check_connect_result
g_socket_receive
g_socket_receive_from
g_socket_receive_message
g_socket_receive_with_blocking
g_socket_send
g_socket_send_to
g_socket_send_message
g_socket_send_with_blocking
g_socket_close
g_socket_is_closed
g_socket_shutdown