GNOME Bugzilla – Bug 735179
gsocketclient: Handle cancellation between CONNECTING and CONNECTED
Last modified: 2014-08-22 18:12:24 UTC
Trivial patch attached.
Created attachment 284121 [details] [review] gsocketclient: Handle cancellation between CONNECTING and CONNECTED If a g_socket_client_connect_async() operation is cancelled between the CONNECTING and CONNECTED events (i.e. while in the g_socket_connection_connect_async() call), the code in g_socket_client_connected_callback() would previously unconditionally loop round and try the next socket address from the address enumerator (by calling enumerator_next_async()). This would correctly handle the cancellation and return from the overall task — but not before emitting a spurious RESOLVING event. Avoid emitting the spurious RESOLVING event by explicitly handling cancellation at the beginning of g_socket_client_connected_callback().
Thanks for the fast review. Attachment 284121 [details] pushed as cb320cb - gsocketclient: Handle cancellation between CONNECTING and CONNECTED