Github user enixon commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/549#discussion_r198609106 --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java --- @@ -259,6 +259,11 @@ public QuorumServer(long sid, String addressStr) throws ConfigException { throw new ConfigException("Address unresolved: " + serverParts[0] + ":" + serverParts[2]); } + if(addr.getPort() == electionAddr.getPort()) { + throw new ConfigException( + "Client and election port must be different! Please update the configuration file on server." + sid); + } + --- End diff -- Double checked and you're right, all the other constructors for this class are only invoked in tests. Agreed that my proposal is a "nice to have" at best.
---