Page MenuHomePhabricator

Probably improve behavior around duplicate notifications
ClosedPublic

Authored by epriestley on Apr 26 2016, 11:33 PM.
Tags
None
Referenced Files
F13198579: D15806.id38077.diff
Mon, May 13, 8:04 AM
F13194530: D15806.diff
Sun, May 12, 9:38 PM
F13179086: D15806.diff
Wed, May 8, 8:55 PM
Unknown Object (File)
Sat, May 4, 6:21 PM
Unknown Object (File)
Fri, May 3, 10:14 PM
Unknown Object (File)
Thu, Apr 25, 1:30 PM
Unknown Object (File)
Wed, Apr 24, 10:32 PM
Unknown Object (File)
Apr 11 2024, 6:56 AM
Subscribers
None

Details

Summary

We're sometimes getting duplicate notifications right now. I think this is because multiple windows are racing and becoming leaders.

Clean this up a little:

  • Fix the timeoout typo.
  • Only try to usurp once.
  • Use different usurp and expire delays, so we don't fire them at the exact same time.

Not sure if this'll work or not but it should theoretically be a little cleaner.

Test Plan
  • Quit Safari, reopened Safari, still saw a fast reconnect to the notification server (this is the goal of usurping).
  • Did normal notification stuff like opening a chat in two windows, got notifications.
  • Hard to reproduce the race for sure, but this at least fixes the outright timeoout bug.

Diff Detail

Repository
rP Phabricator
Branch
leader1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11949
Build 15024: Run Core Tests
Build 15023: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Probably improve behavior around duplicate notifications.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
  • Slightly cleaner behavior.
  • Slightly more explanatory commenting.
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 27 2016, 12:26 AM
This revision was automatically updated to reflect the committed changes.