Closed Bug 997690 Opened 10 years ago Closed 10 years ago

nsHttpConnection::IdleTimeout default can be set internally

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: mcmanus, Assigned: mcmanus)

Details

Attachments

(1 file)

an http connection either
1] runs a transaction immediately and picks up the idle timeout as a
result of processing the response headers

2] has SetIdleTimeout() set on it by the connection manager

..

this patch changes #2 to happen all the time internal to
nsHttpConnection.. in the case of #1 it just gets overwritten by the
real transaction.

This removes a public method on the class and more importantly means
new creators of nsHttpConnection (which I have in another patch) don't
have to implement the same logic.
Attachment #8408181 - Flags: review?(hurley)
Comment on attachment 8408181 [details] [diff] [review]
nsHttpConnection::IdleTimeout default can be set internally

Review of attachment 8408181 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpConnection.cpp
@@ +81,5 @@
>      LOG(("Creating nsHttpConnection @%x\n", this));
> +
> +    // the default timeout is for when this connection has not yet processed a
> +    // transaction
> +    const PRIntervalTime k5Sec = PR_SecondsToInterval(5);

Make this static, so initialization only happens once.
Attachment #8408181 - Flags: review?(hurley) → review+
https://hg.mozilla.org/mozilla-central/rev/7ee8d408e364
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.