Closed Bug 1444887 Opened 6 years ago Closed 6 years ago

TRR: restarted DNS service makes TRR wait for captive portal in vain

Categories

(Core :: Networking: DNS, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox60 --- disabled
firefox61 --- fixed

People

(Reporter: bagder, Assigned: bagder)

Details

(Whiteboard: [necko-triaged][trr])

Attachments

(1 file)

When the DNS service restarts (which it does on network change events and even DNS pref updates), it restarts the TRR service as well.

When the TRR service gets restarted it starts up without knowing the captive portal state and ends up sitting waiting for that event to arrive before it gets used. An event that won't be sent again.

TRR thus needs to check the state on startup in case it has already been confirmed "green".
Comment on attachment 8958076 [details]
bug 1444887 TRR: get captive portal state in init

https://reviewboard.mozilla.org/r/227026/#review232764

::: netwerk/dns/TRRService.cpp:78
(Diff revision 1)
>    }
> +  nsCOMPtr<nsICaptivePortalService> captivePortalService =
> +    do_GetService(NS_CAPTIVEPORTAL_CID);
> +  if (captivePortalService) {
> +    int32_t captiveState;
> +    captivePortalService->GetState(&captiveState);

nit: wrap in MOZ_ALWAYS_SUCCEEDS
Attachment #8958076 - Flags: review?(valentin.gosu) → review+
Pushed by daniel@haxx.se:
https://hg.mozilla.org/integration/autoland/rev/491cb5f5bd9e
TRR: get captive portal state in init r=valentin
https://hg.mozilla.org/mozilla-central/rev/491cb5f5bd9e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Summary: TRR: restarted DNS service makes TRR wait for captive portal in vein → TRR: restarted DNS service makes TRR wait for captive portal in vain
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: