INT-3737: (S)FTP Outbound Gateway Streaming GET
JIRA: https://jira.spring.io/browse/INT-3737 Support returning an `InputStream` from a GET operation. This can be used in conjuction with a `<file:splitter/>` to stream a text file. The user is responsible for releasing the session when the download is complete. The session object is stored in the message header and `RemoteFileUtils.closeSession()` should be called to clean up and close the session. INT-3737: Polishing and Docs Fix `CachedSession.close()` bug Preventing `Caused by: java.io.IOException: Previous raw read was not finalized` when `Session` is returned to the pool, but `readingRaw` hasn't been finalized because the real `close()` isn't invoked in case of normal return to pool.
This commit is contained in:
committed by
Artem Bilan
parent
5e9624f2cf
commit
65d2024937
@@ -144,6 +144,9 @@ public class FtpSession implements Session<FTPFile> {
|
||||
@Override
|
||||
public void close() {
|
||||
try {
|
||||
if (this.readingRaw.get()) {
|
||||
finalizeRaw();
|
||||
}
|
||||
this.client.disconnect();
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user