修复StampedCache类get方法并发问题(issue#IBCIQG@Gitee)

This commit is contained in:
Looly
2024-12-21 00:46:34 +08:00
parent 63c3777c70
commit 738e965a06
8 changed files with 59 additions and 41 deletions

View File

@@ -201,7 +201,7 @@ public class JschSftp extends AbstractFtp {
* @since 4.1.14
*/
public ChannelSftp getClient() {
if (false == this.channel.isConnected()) {
if (!this.channel.isConnected()) {
init();
}
return this.channel;

View File

@@ -89,7 +89,7 @@ public class JschUtil {
public static Channel createChannel(final Session session, final ChannelType channelType, final long timeout) {
final Channel channel;
try {
if (false == session.isConnected()) {
if (!session.isConnected()) {
session.connect((int) timeout);
}
channel = session.openChannel(channelType.getValue());