[libsoup] soup-session-async:fixed a connection starvation issue



commit fce7b8b57a94e2508ec4b3363d443348211d5b37
Author: Sergio Villar Senin <svillar igalia com>
Date:   Mon Jan 17 18:43:20 2011 +0100

    soup-session-async:fixed a connection starvation issue
    
    Trying to cleanup connections ASAP could potentially lead to starvation of the
    messages in the queue tail if we issue a lot of connections in a short period
    of time to a reduced set of servers. As we are able to notice connections
    closed by servers without even running the cleanup connections code, trying to
    prune connections so quickly is not that important now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639768

 libsoup/soup-session-async.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libsoup/soup-session-async.c b/libsoup/soup-session-async.c
index e6751fa..598b734 100644
--- a/libsoup/soup-session-async.c
+++ b/libsoup/soup-session-async.c
@@ -409,7 +409,7 @@ run_queue (SoupSessionAsync *sa)
 
  try_again:
 	for (item = soup_message_queue_first (queue);
-	     item && !should_prune;
+	     item;
 	     item = soup_message_queue_next (queue, item)) {
 		msg = item->msg;
 
@@ -417,8 +417,6 @@ run_queue (SoupSessionAsync *sa)
 		if (msg->method != SOUP_METHOD_CONNECT)
 			process_queue_item (item, &should_prune, TRUE);
 	}
-	if (item)
-		soup_message_queue_item_unref (item);
 
 	if (try_pruning && should_prune) {
 		/* There is at least one message in the queue that



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