giraffe
giraffe copied to clipboard
Fix close() race conditions on SSH systems
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.