You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://build.spring.io/browse/INT-MASTER-1481
The `SftpSession.connect()` may lead to race condition when we try to
open the `channel`, but `JschSession` is closed already.
It may happen in cases when we have `DefaultSftpSessionFactory`
configured for the `isSharedSession` and that shared session may be
closed by another thread before we reach the `channel.connect()`,
because we already have left the `this.sharedSessionLock` blocking path
**Cherry-pick to 5.1.x**
Copy file name to clipboardExpand all lines: spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.java
+6-3
Original file line number
Diff line number
Diff line change
@@ -353,6 +353,7 @@ public SftpSession getSession() {
353
353
"either a password or a private key is required");
354
354
try {
355
355
JSchSessionWrapperjschSession;
356
+
SftpSessionsftpSession;
356
357
if (this.isSharedSession) {
357
358
this.sharedSessionLock.readLock().lock();
358
359
try {
@@ -375,17 +376,19 @@ public SftpSession getSession() {
0 commit comments