Skip to content
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

Refactor connect method and options handling #69

Open
2 tasks
justmoon opened this issue Nov 10, 2016 · 0 comments
Open
2 tasks

Refactor connect method and options handling #69

justmoon opened this issue Nov 10, 2016 · 0 comments

Comments

@justmoon
Copy link
Contributor

The connect method is currently used as an asynchronous constructor of sorts. There are a lot of paths through this code and many are probably not safe.

  • Move asynchronous options resolution, sanitization and normalization into a separate method (currently in connect.)
  • Before connecting successfully, much of the plugin's internal state is incomplete, so it should refuse all calls to its other methods until connect has been called successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants