INT-3575 TcpNetConnection: flush stream in send()

JIRA: https://jira.spring.io/browse/INT-3575
This commit is contained in:
Artem Bilan
2014-12-11 13:14:07 +02:00
parent 8ec4ab0355
commit f89963dc9b
2 changed files with 4 additions and 3 deletions

View File

@@ -93,6 +93,7 @@ public class TcpNetConnection extends TcpConnectionSupport {
this.lastSend = System.currentTimeMillis();
try {
((Serializer<Object>) this.getSerializer()).serialize(object, this.socketOutputStream);
this.socketOutputStream.flush();
}
catch (Exception e) {
this.publishConnectionExceptionEvent(e);
@@ -125,7 +126,7 @@ public class TcpNetConnection extends TcpConnectionSupport {
/**
* If there is no listener, and this connection is not for single use,
* this method exits. When there is a listener, the method runs in a
* loop reading input from the connections's stream, data is converted
* loop reading input from the connection's stream, data is converted
* to an object using the {@link Deserializer} and the listener's
* {@link TcpListener#onMessage(Message)} method is called. For single use
* connections with no listener, the socket is closed after its timeout

View File

@@ -581,7 +581,7 @@
<para>
Normally, inbound adapters use a type="server" connection
factory, which listens for incoming connection requests.
In some cases, it is desireable to establish the connection
In some cases, it is desirable to establish the connection
in reverse, whereby the inbound adapter connects to an
external server and then waits for inbound messages on that
connection.
@@ -650,7 +650,7 @@
As with inbound adapters, inbound gateways normally use a
type="server" connection
factory, which listens for incoming connection requests.
In some cases, it is desireable to establish the connection
In some cases, it is desirable to establish the connection
in reverse, whereby the inbound gateway connects to an
external server and then waits for, and replies to, inbound
messages on that connection.