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

Possible timing issues around connecting #55

Open
CodeBaboon opened this issue Oct 21, 2015 · 1 comment
Open

Possible timing issues around connecting #55

CodeBaboon opened this issue Oct 21, 2015 · 1 comment

Comments

@CodeBaboon
Copy link
Contributor

If Close() is fired before Connect() completes it may be possible to end up with a dangling open connection. Probably need isConnecting and/or isOpening states to handle situations such as this, along with deferred execution (ie if Close() is called while isConnecting then defer the close action until connect() has completed).

@omsmith
Copy link
Contributor

omsmith commented Oct 21, 2015

Slight correction:

Currently, close is not allowed to be called until the port is open (which does happen immediately upon connect actually, given promises are specified to be run synchronously. This seems like an implementation detail at the moment though?).

Ideally we should be able to close before connect has completed in a clear manner (such that connectQueue would be cleared, and perhaps the other party notified).

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