Skip to content

Commit

Permalink
ignore unknown command
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbodong22011 committed Apr 6, 2023
1 parent a3417fc commit 79b23f9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/redis/clients/jedis/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,17 @@ private void initializeFromClientConfig(JedisClientConfig config) {
sendCommand(arg);
}

// getMany and ignore result
getMany(fireAndForgetMsg.size());
flush();

for (int i = 0; i < fireAndForgetMsg.size(); i++) {
readProtocolWithCheckingBroken();
}
} catch (JedisDataException e) {
// just ignore dataException, such as unknown command
if (e.getMessage().contains("unknown")) {
// just ignore dataException, such as unknown command
} else {
throw e;
}
}
} catch (JedisException je) {
try {
Expand Down

0 comments on commit 79b23f9

Please sign in to comment.