mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 997690 - nsHttpConnection::IdleTimeout default can be set internally r=hurley
This commit is contained in:
parent
e70e998770
commit
f5f3f65dee
@ -48,7 +48,6 @@ nsHttpConnection::nsHttpConnection()
|
||||
: mTransaction(nullptr)
|
||||
, mHttpHandler(gHttpHandler)
|
||||
, mCallbacksLock("nsHttpConnection::mCallbacksLock")
|
||||
, mIdleTimeout(0)
|
||||
, mConsiderReusedAfterInterval(0)
|
||||
, mConsiderReusedAfterEpoch(0)
|
||||
, mCurrentBytesRead(0)
|
||||
@ -80,6 +79,12 @@ nsHttpConnection::nsHttpConnection()
|
||||
, mTCPKeepaliveConfig(kTCPKeepaliveDisabled)
|
||||
{
|
||||
LOG(("Creating nsHttpConnection @%x\n", this));
|
||||
|
||||
// the default timeout is for when this connection has not yet processed a
|
||||
// transaction
|
||||
static const PRIntervalTime k5Sec = PR_SecondsToInterval(5);
|
||||
mIdleTimeout =
|
||||
(k5Sec < gHttpHandler->IdleTimeout()) ? k5Sec : gHttpHandler->IdleTimeout();
|
||||
}
|
||||
|
||||
nsHttpConnection::~nsHttpConnection()
|
||||
|
@ -114,7 +114,6 @@ public:
|
||||
bool IsPersistent() { return IsKeepAlive(); }
|
||||
bool IsReused();
|
||||
void SetIsReusedAfter(uint32_t afterMilliseconds);
|
||||
void SetIdleTimeout(PRIntervalTime val) {mIdleTimeout = val;}
|
||||
nsresult PushBack(const char *data, uint32_t length);
|
||||
nsresult ResumeSend();
|
||||
nsresult ResumeRecv();
|
||||
|
@ -3067,14 +3067,6 @@ nsHalfOpenSocket::OnOutputStreamReady(nsIAsyncOutputStream *out)
|
||||
// this transaction was dispatched off the pending q before all the
|
||||
// sockets established themselves.
|
||||
|
||||
// We need to establish a small non-zero idle timeout so the connection
|
||||
// mgr perceives this socket as suitable for persistent connection reuse
|
||||
const PRIntervalTime k5Sec = PR_SecondsToInterval(5);
|
||||
if (k5Sec < gHttpHandler->IdleTimeout())
|
||||
conn->SetIdleTimeout(k5Sec);
|
||||
else
|
||||
conn->SetIdleTimeout(gHttpHandler->IdleTimeout());
|
||||
|
||||
// After about 1 second allow for the possibility of restarting a
|
||||
// transaction due to server close. Keep at sub 1 second as that is the
|
||||
// minimum granularity we can expect a server to be timing out with.
|
||||
|
Loading…
Reference in New Issue
Block a user