[libsoup] soup-message-io: clear connection from queue items when IDLE status is set



commit c56c66aa2625bc95f54f8a1972e13503f454a51a
Author: Sergio Villar Senin <svillar igalia com>
Date:   Thu May 26 15:27:37 2011 +0200

    soup-message-io: clear connection from queue items when IDLE status is set
    
    Do not reuse the SoupConnection we used for the first time when
    a SoupMessage gets redirected as it could have been assigned to a different
    SoupMessage meanwhile.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=651146

 libsoup/soup-message-io.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-message-io.c b/libsoup/soup-message-io.c
index 290d781..c7da2c8 100644
--- a/libsoup/soup-message-io.c
+++ b/libsoup/soup-message-io.c
@@ -146,8 +146,11 @@ soup_message_io_stop (SoupMessage *msg)
 
 	if (io->read_state < SOUP_MESSAGE_IO_STATE_FINISHING)
 		soup_socket_disconnect (io->sock);
-	else if (io->item && io->item->conn)
+	else if (io->item && io->item->conn) {
 		soup_connection_set_state (io->item->conn, SOUP_CONNECTION_IDLE);
+		g_object_unref (io->item->conn);
+		io->item->conn = NULL;
+	}
 }
 
 #define SOUP_MESSAGE_IO_EOL            "\r\n"



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