Page MenuHomePhabricator

Probably improve behavior around duplicate notifications
ClosedPublic

Authored by epriestley on Apr 26 2016, 11:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 10, 6:42 PM
Unknown Object (File)
Feb 8 2024, 8:09 AM
Unknown Object (File)
Feb 3 2024, 8:19 AM
Unknown Object (File)
Feb 2 2024, 8:10 AM
Unknown Object (File)
Jan 26 2024, 10:20 PM
Unknown Object (File)
Jan 6 2024, 9:28 AM
Unknown Object (File)
Jan 2 2024, 10:39 PM
Unknown Object (File)
Dec 27 2023, 8:03 PM
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
Lint
Lint Not Applicable
Unit
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.