Skip to content

Commit

Permalink
fix: ignore LOADING error to prevent out of sync order message
Browse files Browse the repository at this point in the history
  • Loading branch information
dntam00 committed Jan 10, 2025
1 parent 8897ec3 commit 74b6312
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ var noHello = regexp.MustCompile("unknown command .?(HELLO|hello).?")
// See https://github.com/redis/rueidis/pull/691
func isUnsubReply(msg *RedisMessage) bool {
// ex. NOPERM User limiteduser has no permissions to run the 'ping' command
if msg.typ == '-' && strings.Contains(msg.string, "'ping'") {
// ex. LOADING server is loading the dataset in memory
if msg.typ == '-' && (strings.HasPrefix(msg.string, "LOADING") || strings.Contains(msg.string, "'ping'")) {
msg.typ = '+'
msg.string = "PONG"
return true
Expand Down

0 comments on commit 74b6312

Please sign in to comment.