Skip to content

Commit

Permalink
fix: using 2424 as default port in HA configuration if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Jul 20, 2023
1 parent 35e18ba commit 5ece09b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/src/main/java/com/arcadedb/server/ha/HAServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ public void startElection() {

try {

final String[] parts = serverAddressCopy.split(":");
String[] parts = serverAddressCopy.split(":");
if (parts.length == 1)
parts = new String[] { parts[0], DEFAULT_PORT };

final ChannelBinaryClient channel = createNetworkConnection(parts[0], Integer.parseInt(parts[1]), ReplicationProtocol.COMMAND_VOTE_FOR_ME);
channel.writeLong(electionTurn);
Expand Down Expand Up @@ -331,7 +333,7 @@ public void startElection() {

channel.close();
} catch (final Exception e) {
LogManager.instance().log(this, Level.INFO, "Error contacting server %s for election", serverAddressCopy);
LogManager.instance().log(this, Level.INFO, "Error contacting server %s for election", e, serverAddressCopy);
}
}

Expand Down

0 comments on commit 5ece09b

Please sign in to comment.