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
@@ -355,6 +355,7 @@ public SftpSession getSession() {
355
355
"either a password or a private key is required");
356
356
try {
357
357
JSchSessionWrapperjschSession;
358
+
SftpSessionsftpSession;
358
359
if (this.isSharedSession) {
359
360
this.sharedSessionLock.readLock().lock();
360
361
try {
@@ -377,17 +378,19 @@ public SftpSession getSession() {
0 commit comments