INT-1664, INT-1665 added isOpen() method to the Session strategy, added check for stale connection to the CachingSessionFactory which will ensure that it only returns valid (non-stale) Session
This commit is contained in:
@@ -39,6 +39,7 @@ import com.jcraft.jsch.SftpException;
|
||||
* @author Josh Long
|
||||
* @author Mario Gray
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
* @since 2.0
|
||||
*/
|
||||
class SftpSession implements Session {
|
||||
@@ -136,4 +137,8 @@ class SftpSession implements Session {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isOpen() {
|
||||
return this.channel.isConnected() && this.jschSession.isConnected();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user