zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #669: ZOOKEEPER-3152: Port ZK netty stack to netty4
Date Fri, 19 Oct 2018 15:38:52 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/669#discussion_r226687650
  
    --- Diff: zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxn.java
---
    @@ -200,24 +186,13 @@ public void setSessionId(long sessionId) {
             this.sessionId = sessionId;
         }
     
    -    @Override
    -    public void enableRecv() {
    -        if (throttled) {
    -            throttled = false;
    -            if (LOG.isDebugEnabled()) {
    -                LOG.debug("Sending unthrottle event " + this);
    -            }
    -            channel.getPipeline().sendUpstream(new ResumeMessageEvent(channel));
    -        }
    -    }
    -
         @Override
         public void sendBuffer(ByteBuffer sendBuffer) {
             if (sendBuffer == ServerCnxnFactory.closeConn) {
                 close();
                 return;
             }
    -        channel.write(wrappedBuffer(sendBuffer));
    +        channel.writeAndFlush(Unpooled.wrappedBuffer(sendBuffer));
    --- End diff --
    
    Consider using voidPromise()


---

Mime
View raw message