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
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"