Github user enixon commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/549#discussion_r198338704
--- 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 --
Does it make sense to apply a similar change to the
`public QuorumServer(long id, InetSocketAddress addr,
InetSocketAddress electionAddr, InetSocketAddress clientAddr, LearnerType
type) {`
constructor below?
---