Bug 1354796 - Close unconnected HTTP connection with NS_ERROR_NET_TIMEOUT after 90s timeout. r=mcmanus, a=ritu
authorHonza Bambas <honzab.moz@firemni.cz>
Wed, 03 May 2017 08:31:00 -0400
changeset 356051 69d1a9de76b9ee7ec0224eeac00c76b9d88909e4
parent 356050 056206bd99b0dc6b9045db738f1eb39199bb0f7f
child 356052 c5eaa2d51b9f43541bdb88a8e87ad3a20cfb18a2
push id7195
push userryanvm@gmail.com
push dateThu, 06 Jul 2017 21:29:56 +0000
treeherdermozilla-esr52@731958f7ff4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, ritu
bugs1354796
milestone52.2.1
Bug 1354796 - Close unconnected HTTP connection with NS_ERROR_NET_TIMEOUT after 90s timeout. r=mcmanus, a=ritu
netwerk/protocol/http/nsHttpConnectionMgr.cpp
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -2794,20 +2794,20 @@ nsHttpConnectionMgr::TimeoutTick()
                 nsHalfOpenSocket *half = ent->mHalfOpens[index];
                 double delta = half->Duration(currentTime);
                 // If the socket has timed out, close it so the waiting
                 // transaction will get the proper signal.
                 if (delta > maxConnectTime_ms) {
                     LOG(("Force timeout of half open to %s after %.2fms.\n",
                          ent->mConnInfo->HashKey().get(), delta));
                     if (half->SocketTransport()) {
-                        half->SocketTransport()->Close(NS_ERROR_ABORT);
+                        half->SocketTransport()->Close(NS_ERROR_NET_TIMEOUT);
                     }
                     if (half->BackupTransport()) {
-                        half->BackupTransport()->Close(NS_ERROR_ABORT);
+                        half->BackupTransport()->Close(NS_ERROR_NET_TIMEOUT);
                     }
                 }
 
                 // If this half open hangs around for 5 seconds after we've
                 // closed() it then just abandon the socket.
                 if (delta > maxConnectTime_ms + 5000) {
                     LOG(("Abandon half open to %s after %.2fms.\n",
                          ent->mConnInfo->HashKey().get(), delta));