Page MenuHomePhabricator

Probably improve behavior around duplicate notifications

Authored by epriestley on Apr 26 2016, 11:33 PM.
Referenced Files
F11653916: D15806.id38077.diff
Sat, Apr 1, 11:51 AM
Unknown Object (File)
Wed, Mar 15, 11:27 PM
Unknown Object (File)
Feb 28 2023, 12:00 PM
Unknown Object (File)
Feb 28 2023, 11:54 AM
Unknown Object (File)
Feb 27 2023, 9:52 AM
Unknown Object (File)
Feb 7 2023, 10:48 PM
Unknown Object (File)
Jan 21 2023, 9:17 PM
Unknown Object (File)
Jan 17 2023, 2:32 AM



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

rP Phabricator
Lint Not Applicable
Tests Not Applicable

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.