mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
Close before interrupt LocalPortForwarder (Fixes #426)
This commit is contained in:
@@ -181,8 +181,8 @@ public class LocalPortForwarder {
|
|||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
if (!serverSocket.isClosed()) {
|
if (!serverSocket.isClosed()) {
|
||||||
log.info("Closing listener on {}", serverSocket.getLocalSocketAddress());
|
log.info("Closing listener on {}", serverSocket.getLocalSocketAddress());
|
||||||
serverSocket.close();
|
|
||||||
runningThread.interrupt();
|
runningThread.interrupt();
|
||||||
|
serverSocket.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user