zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivmaykov <...@git.apache.org>
Subject [GitHub] zookeeper pull request #184: ZOOKEEPER-236: SSL Support for Atomic Broadcast...
Date Sat, 16 Jun 2018 02:24:52 GMT
Github user ivmaykov commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/184#discussion_r195891451
  
    --- 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 --
    
    Ok, makes sense. Sorry about wasting your time with a bad code review proposal.


---

Mime
View raw message