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

Fix close() race conditions on SSH systems #24

Open
bluekeyes opened this issue Jul 7, 2015 · 0 comments
Open

Fix close() race conditions on SSH systems #24

bluekeyes opened this issue Jul 7, 2015 · 0 comments
Labels

Comments

@bluekeyes
Copy link
Member

Currently, closed checks are susceptible to a check-then-act race condition. While this isn't too bad (when they actually go to use the connection, there will be an error), it would be better to throw the correct Closed*SystemException. We can also close the system while operations are in progress, which is a more serious error.

Make close either block until all pending operations are complete or queue the closure, but avoid closing the connection until all pending operations are complete.

@bluekeyes bluekeyes added the bug label Jul 7, 2015
@bluekeyes bluekeyes changed the title Fix race conditions between close() and other methods on SSH systems Fix close() race conditions on SSH systems Jul 7, 2015
bluekeyes added a commit that referenced this issue Jul 8, 2015
Remove close() implementation from BaseFileSystem because it was not
flexible enough for real use cases (see also #24).

Refactor SSH system creation to better support HostControlSystems.
Essentially, constructing any system also creates its pair, but this is
relatively lightweight because connections are shared.

Fixes #12.
bluekeyes added a commit that referenced this issue Jul 10, 2015
This fixes #11, but is now susceptible to the race condition described
in #24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant