From: Sergio Villar Senin Date: Thu, 26 May 2011 13:27:37 +0000 (+0200) Subject: soup-message-io: clear connection from queue items when IDLE status is set X-Git-Tag: LIBSOUP_2_35_3~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c56c66aa2625bc95f54f8a1972e13503f454a51a;p=platform%2Fupstream%2Flibsoup.git 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 --- 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"