Closed Bug 1112847 Opened 10 years ago Closed 10 years ago

Only connect once with auto-connect

Categories

(DevTools Graveyard :: WebIDE, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 37

People

(Reporter: jryans, Assigned: jryans)

References

Details

Attachments

(1 file, 1 obsolete file)

Auto-connect today can trigger multiple connection attempts, as it gets triggered for every new runtime in the runtime list.
Attachment #8538143 - Attachment is obsolete: true
Attachment #8538143 - Flags: review?(poirot.alex)
Attachment #8538159 - Flags: review?(poirot.alex)
Comment on attachment 8538159 [details] [diff] [review]
0001-Bug-1112847-Only-connect-once-with-auto-connect.-r-o.patch

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

Looks good but I miss the precise connect scenario you are trying to avoid?
Attachment #8538159 - Flags: review?(poirot.alex) → review+
(In reply to Alexandre Poirot [:ochameau] from comment #6)
> Comment on attachment 8538159 [details] [diff] [review]
> 0001-Bug-1112847-Only-connect-once-with-auto-connect.-r-o.patch
> 
> Review of attachment 8538159 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good but I miss the precise connect scenario you are trying to avoid?

It's related to the auth I am building for WiFi in bug 1103120, sorry for not being more clear.

Prior to this patch, we'd call |connectToRuntime| as each runtime item is added.  So once you have one runtime that matches what was saved, we keep calling |connectToRuntime| for each runtime added.  So, you can get N calls to |connectToRuntime| when only one is needed if you have N available runtimes.

For the moment, it's probably not noticeable that we call |connectToRuntime| N times, as we'll just eventually use the last one.  But for WiFi authentication, I need to display a dialog in WebIDE when connecting, so N connections means N dialogs stacking on top of each other crazily.
https://hg.mozilla.org/mozilla-central/rev/4b6433d98835
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 37
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: