Files
spring-integration/spring-integration-file
Artem Bilan d71fb2e5da GH-3271: Close session on error in stream source
Fixes https://github.com/spring-projects/spring-integration/issues/3271

When exception happens at `.withPayload(session.readRaw(remotePath))`
in the `AbstractRemoteFileStreamingMessageSource` we don't close session.
The resource leaking happens in the caching session factory

* Add `session.close();` into the `catch (IOException e) {`
in the `AbstractRemoteFileStreamingMessageSource.doReceive()`
to clean up resources properly

**Cherry-pick to 5.2.x, 5.1.x & 4.3.x**
2020-05-11 16:40:55 -04:00
..