GH-2974: Fix race in TcpNetConnection.getPayload()

Fixes https://github.com/spring-projects/spring-integration/issues/2974

There is a race in that we could get a `SocketException` in `inputStream`.
Since this is between payloads, it needs to be thrown as a
`SoftEndOfStreamException`.

* * Add javadocs to SoftEndOfStreamException

* * SEOSE is now a RuntimeException (can't be an UncheckedIOException - no default CTOR
This commit is contained in:
Gary Russell
2019-06-26 11:15:34 -04:00
committed by Artem Bilan
parent 59cdc4ddae
commit 175223d0e0
6 changed files with 69 additions and 7 deletions

View File

@@ -498,6 +498,8 @@ To implement a custom serializer and deserializer pair, implement the `org.sprin
When the deserializer detects a closed input stream between messages, it must throw a `SoftEndOfStreamException`; this is a signal to the framework to indicate that the close was "normal".
If the stream is closed while decoding a message, some other exception should be thrown instead.
Starting with version 5.2, `SoftEndOfStreamException` is now a `RuntimeException` instead of extending `IOException`.
[[caching-cf]]
==== TCP Caching Client Connection Factory

View File

@@ -87,6 +87,8 @@ See <<./ip.adoc#tcp-gateways, TCP Gateways>> for more information.
The client connection factories now support `connectTimeout` which causes an exception to be thrown if the connection is not established in that time.
See <<./ip.adoc#tcp-connection-factory, TCP Connection Factories>> for more information.
`SoftEndOfStreamException` is now a `RuntimeException` instead of extending `IOException`.
[[x5.2-mail]]
==== Mail Changes