From eb2869bd7fe3ea856c7d25a1518699cb905a8954 Mon Sep 17 00:00:00 2001
From: Monty Brandenberg <monty@lindenlab.com>
Date: Mon, 29 Jul 2013 16:09:22 -0400
Subject: [PATCH] SH-4371  Reduce 22mS inter-conenction latency on HTTP
 operations. Simple change dropped this value by 7-10mS or so.  Any time we
 complete an operation on a transport pass, arrange to skip the run-loop sleep
 so that we fill a possible empty slot as quickly as possible.  With
 pipelining, this kind of thing should become unnecessary but for now, we'll
 do this to increase throughput.

---
 indra/llcorehttp/_httplibcurl.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/indra/llcorehttp/_httplibcurl.cpp b/indra/llcorehttp/_httplibcurl.cpp
index d187697e7b5..b079dff8643 100755
--- a/indra/llcorehttp/_httplibcurl.cpp
+++ b/indra/llcorehttp/_httplibcurl.cpp
@@ -132,12 +132,10 @@ HttpService::ELoopSpeed HttpLibcurl::processTransport()
 				CURL * handle(msg->easy_handle);
 				CURLcode result(msg->data.result);
 
-				if (completeRequest(mMultiHandles[policy_class], handle, result))
-				{
-					// Request is still active, don't get too sleepy
-					ret = HttpService::NORMAL;
-				}
-				handle = NULL;			// No longer valid on return
+				completeRequest(mMultiHandles[policy_class], handle, result);
+				handle = NULL;					// No longer valid on return
+				ret = HttpService::NORMAL;		// If anything completes, we may have a free slot.
+												// Turning around quickly reduces connection gap by 7-10mS.
 			}
 			else if (CURLMSG_NONE == msg->msg)
 			{
-- 
GitLab