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 #184: ZOOKEEPER-236: SSL Support for Atomic Broadcast...
Date Sun, 17 Jun 2018 16:50:54 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/184#discussion_r195935031
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/Leader.java ---
    @@ -227,19 +229,36 @@ public boolean isQuorumSynced(QuorumVerifier qv) {
         
         private final ServerSocket ss;
     
    -    Leader(QuorumPeer self,LeaderZooKeeperServer zk) throws IOException {
    +    Leader(QuorumPeer self,LeaderZooKeeperServer zk) throws IOException, X509Exception
{
             this.self = self;
             this.proposalStats = new ProposalStats();
             try {
    -            if (self.getQuorumListenOnAllIPs()) {
    -                ss = new ServerSocket(self.getQuorumAddress().getPort());
    +            if (self.shouldUsePortUnification()) {
    +                if (self.getQuorumListenOnAllIPs()) {
    +                    ss = new UnifiedServerSocket(new QuorumX509Util(), self.getQuorumAddress().getPort());
    +                } else {
    +                    ss = new UnifiedServerSocket(new QuorumX509Util());
    +                }
    +            } else if (self.isSslQuorum()) {
    --- End diff --
    
    Don't worry too much. It was useful to get a clear understanding on what's going on. Documenting
it would be great of course. There's a separate PR for the documentation, we'll cover that
once this one is in.


---

Mime
View raw message