hierynomus / sshj

ssh, scp and sftp for java
Apache License 2.0
2.49k stars 602 forks source link

I have tried to disconnect the sshclient in my java code, but the operating system did not disconnect port 22? #927

Closed graybird7 closed 7 months ago

graybird7 commented 8 months ago

image

image

jhammelm commented 8 months ago

Maybe try to avoid closing connections / sessions etc. at finally! close() calls interrupt(), which doesn't close threads anymore at finally. If you use Java 11, please upgrade - there is a bug in Java 11.

graybird7 commented 7 months ago

I found an unclosed connection in another method in the code. There is nothing wrong with SSHJ itself, it's my problem. Thank you.