Skip to content

Commit

Permalink
JedisConnectionException contains HostAndPort from DefaultJedisSocket…
Browse files Browse the repository at this point in the history
…Factory (#3896)
  • Loading branch information
sazzad16 authored Jul 16, 2024
1 parent 773651c commit 2274416
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/redis/clients/jedis/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ protected void flush() {

protected Object readProtocolWithCheckingBroken() {
if (broken) {
throw new JedisConnectionException("Attempting to read from a broken connection");
throw new JedisConnectionException("Attempting to read from a broken connection.");
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private Socket connectToFirstSuccessfulHost(HostAndPort hostAndPort) throws Exce
Collections.shuffle(hosts);
}

JedisConnectionException jce = new JedisConnectionException("Failed to connect to any host resolved for DNS name.");
JedisConnectionException jce = new JedisConnectionException("Failed to connect to " + hostAndPort + ".");
for (InetAddress host : hosts) {
try {
Socket socket = new Socket();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public int incrementActiveMultiClusterIndex() {

throw new JedisConnectionException("Cluster/database endpoint could not failover since the MultiClusterClientConfig was not " +
"provided with an additional cluster/database endpoint according to its prioritized sequence. " +
"If applicable, consider failing back OR restarting with an available cluster/database endpoint");
"If applicable, consider failing back OR restarting with an available cluster/database endpoint.");
}
else activeMultiClusterIndex++;

Expand Down

0 comments on commit 2274416

Please sign in to comment.