Ok. Finally got some time to properly test this and explore the mentioned 
variants. Apologies for the delay! I've successfully tested the patch and 
verified that all resources are now properly closed with both sshj and jsch 
drivers.

I've made some tests implementing the `Closer` approach but found these tests 
in the [sshj 
driver](https://github.com/jclouds/jclouds/blob/master/drivers/sshj/src/test/java/org/jclouds/sshj/SshjSshClientLiveTest.java#L173-L189)
 and the [jsch 
one](https://github.com/jclouds/jclouds/blob/master/drivers/jsch/src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java#L263-L280)
 that suggest that it was a design decision not to close the SSH vlients when 
closing the context. We could discuss whether that is convenient or not (a 
valid use case could be to just get a connection to the node, then forget about 
the context and all Guice related resources), but not in the scope of this fix.

Pushed to 
[master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/060b66a4) and 
[1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/c6f47ca9). Thanks 
for the patch @chemikadze!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/778#issuecomment-150987471

Reply via email to