Closed Bug 1411316 Opened 7 years ago Closed 6 years ago

api for cancelling existing transactions

Categories

(Core :: Networking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mcmanus, Assigned: kershaw)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

there is not currently an API for closing all existing connections abruptly without shutting down (you can do so gracefully). Apparently this would help with NSS shutdown, so here we go.

I'm not going to write a test until we have some feedback that it is solving the problem david is aiming at..
Priority: -- → P2
Whiteboard: [necko-triaged]
Yep - this is exactly what I was looking for - Thanks! Sorry I took a while to get to this...
Whoops - forgot need info. See comment 2.
Flags: needinfo?(mcmanus)
nick, do you think you could write a test for this and review the code? (I can review the test).
Flags: needinfo?(mcmanus) → needinfo?(hurley)
Nick,

Since this could have ... interesting ... implications, we'd like to get this in for as much of this new Nightly cycle as we can for maximum testing time.
I'm pretty swamped as it is. I'm happy to review code, but it would take me longer to come up to speed enough to write a test when you're already familiar with this.
Flags: needinfo?(hurley)
Flags: needinfo?(mcmanus)
(In reply to Nicholas Hurley [:nwgh][:hurley] (also hurley@todesschaf.org) from comment #6)
> I'm pretty swamped as it is. I'm happy to review code, but it would take me
> longer to come up to speed enough to write a test when you're already
> familiar with this.

I'll try to write a test for this.
Assignee: nobody → kechang
Flags: needinfo?(mcmanus)
Attached patch Test caseSplinter Review
I've created a test for this. Basically, the purpose of this test is checking whether all active connections are canceled or not. Please see the front of the test file for more details.

Not sure if this test is enough. Patrick, could you take a look at this patch?
Thanks.
Attachment #8935675 - Flags: feedback?(mcmanus)
Comment on attachment 8935675 [details] [diff] [review]
Test case

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

thanks
Attachment #8935675 - Flags: feedback?(mcmanus) → feedback+
Attachment #8935675 - Flags: review+
Attachment #8921526 - Flags: review?(dd.mozilla)
Comment on attachment 8921526 [details]
Bug 1411316 - necko api for cancelling all transactions

https://reviewboard.mozilla.org/r/192546/#review212864

::: netwerk/protocol/http/nsHttpConnectionMgr.cpp
(Diff revision 1)
>          }
>  
> -        // If all idle connections are removed we can stop pruning dead
> -        // connections.
> -        ConditionallyStopPruneDeadConnectionsTimer();
> -

You can leave this here. It is ok to cancel the timer if we close all connections. The function check if there are active or idle connections.
Attachment #8921526 - Flags: review?(dd.mozilla) → review+
Pushed by mcmanus@ducksong.com:
https://hg.mozilla.org/integration/autoland/rev/46b0f7f066e3
necko api for cancelling all transactions r=dragana
https://hg.mozilla.org/mozilla-central/rev/46b0f7f066e3
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: