aboutsummaryrefslogtreecommitdiff
path: root/netty
diff options
context:
space:
mode:
authorzpencer <spencerfang@google.com>2017-06-28 10:23:48 -0700
committerGitHub <noreply@github.com>2017-06-28 10:23:48 -0700
commitf559cf4adf318923fbc0b139034ec768ff205ab5 (patch)
treef6712af5830bfd6ae2a3f91a5f5f91b1aacd712c /netty
parent4b94237bb9839d31aa1f77b1c30f824960998e7d (diff)
downloadgrpc-grpc-java-f559cf4adf318923fbc0b139034ec768ff205ab5.tar.gz
netty: client transport needs to flush fence operation (#3137)
This the cause of the flakey serverNotListening test, because the NOOP_MESSAGE just sits around the pipeline. As a result, the listener does not fire within the 1s verification timeout.
Diffstat (limited to 'netty')
-rw-r--r--netty/src/main/java/io/grpc/netty/NettyClientTransport.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/netty/src/main/java/io/grpc/netty/NettyClientTransport.java b/netty/src/main/java/io/grpc/netty/NettyClientTransport.java
index 21054524e..b251a575b 100644
--- a/netty/src/main/java/io/grpc/netty/NettyClientTransport.java
+++ b/netty/src/main/java/io/grpc/netty/NettyClientTransport.java
@@ -224,7 +224,7 @@ class NettyClientTransport implements ConnectionClientTransport {
channel.connect(address);
// This write will have no effect, yet it will only complete once the negotiationHandler
// flushes any pending writes.
- channel.write(NettyClientHandler.NOOP_MESSAGE).addListener(new ChannelFutureListener() {
+ channel.writeAndFlush(NettyClientHandler.NOOP_MESSAGE).addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess()) {