giraffe icon indicating copy to clipboard operation
giraffe copied to clipboard

Fix close() race conditions on SSH systems

Open bluekeyes opened this issue 10 years ago • 0 comments

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 avatar Jul 07 '15 00:07 bluekeyes