[libgdata] core: Prevent a race condition in joining GDataUploadStream's network thread



commit 76ddf92f954288ff187b69328e37317829f24ce9
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Dec 16 19:22:09 2010 +0000

    core: Prevent a race condition in joining GDataUploadStream's network thread
    
    Helps: bgo#637036

 gdata/gdata-upload-stream.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/gdata/gdata-upload-stream.c b/gdata/gdata-upload-stream.c
index fb2b550..3d1d3be 100644
--- a/gdata/gdata-upload-stream.c
+++ b/gdata/gdata-upload-stream.c
@@ -271,12 +271,7 @@ gdata_upload_stream_dispose (GObject *object)
 
 	/* Close the stream before unreffing things like priv->service, which stops crashes like bgo#602156 if the stream is unreffed in the middle
 	 * of network operations */
-	if (g_output_stream_is_closed (G_OUTPUT_STREAM (object)) == FALSE)
-		g_output_stream_close (G_OUTPUT_STREAM (object), NULL, NULL);
-
-	/* Wait for any outstanding operations to finish */
-	if (priv->network_thread != NULL)
-		g_thread_join (priv->network_thread);
+	g_output_stream_close (G_OUTPUT_STREAM (object), NULL, NULL);
 
 	if (priv->service != NULL)
 		g_object_unref (priv->service);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]