mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 07:40:55 +03:00
Catch interrupt signal in keepalive thread
Interrupt signal may be catched when keepalive thread is sleeping. As a result, it will still go into conn.getTransport().die(e).
This commit is contained in:
@@ -65,6 +65,8 @@ public abstract class KeepAlive extends Thread {
|
|||||||
}
|
}
|
||||||
Thread.sleep(hi * 1000);
|
Thread.sleep(hi * 1000);
|
||||||
}
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
// Interrupt signal may be catched when sleeping.
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// If we weren't interrupted, kill the transport, then this exception was unexpected.
|
// If we weren't interrupted, kill the transport, then this exception was unexpected.
|
||||||
// Else we're in shutdown-mode already, so don't forcibly kill the transport.
|
// Else we're in shutdown-mode already, so don't forcibly kill the transport.
|
||||||
|
|||||||
Reference in New Issue
Block a user