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