Skip to content

Rewrite createAblyHandler to address channel race conditions #5349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rmosolgo
Copy link
Owner

The updates createAblyHandler to address some race conditions that @jscheid ran into. (He wrote this and shared it with me, I updated the tests.)

It uses Ably 2+ which requires some changes, and has some changes of its own as shown in the diff of the tests:

  • Several Ably functions return Promises and don't accept an onError handler, so those handlers should be moved to .catch(...). Those shouldn't require updates in an app's subscription code those, since they're internal to createAblyHandler.
  • onError is called with a "payload" object whose .errors property contains the errors -- but again, I don't think this would go in application code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant