zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #679: ZOOKEEPER-3172: Quorum TLS - fix port unificati...
Date Wed, 14 Nov 2018 23:27:58 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/679#discussion_r233661093
  
    --- Diff: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/PrependableSocket.java
---
    @@ -18,32 +18,47 @@
     
     package org.apache.zookeeper.server.quorum;
     
    -import java.io.ByteArrayInputStream;
     import java.io.IOException;
     import java.io.InputStream;
    -import java.io.SequenceInputStream;
    +import java.io.PushbackInputStream;
     import java.net.Socket;
     import java.net.SocketImpl;
     
     public class PrependableSocket extends Socket {
     
    -  private SequenceInputStream sequenceInputStream;
    +  private PushbackInputStream pushbackInputStream;
    --- End diff --
    
    But I suspect the second read() will read from the other stream of the Sequence. Which
is okay, because client has to initiate another read call if it hasn't received everything
it needed.
    Anyway I wouldn't say go back to that impl, just speculating. I believe handling the 2
streams seamlessly is desirable.


---

Mime
View raw message