mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 00:00:54 +03:00
Improved test stability
This commit is contained in:
@@ -137,6 +137,15 @@ public class LocalPortForwarder {
|
||||
listen(Thread.currentThread());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this listener is running (ie. whether a thread is attached to it).
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRunning() {
|
||||
return this.runningThread != null && !serverSocket.isClosed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Start listening for incoming connections and forward to remote host as a channel and ensure that the thread is registered.
|
||||
* This is useful if for instance {@link #close() is called from another thread}
|
||||
|
||||
Reference in New Issue
Block a user