Skip to content

Commit

Permalink
Fix skip offset calculation in connection info manager
Browse files Browse the repository at this point in the history
This fixes the failing XREADGROUP test. When calling position() after skip(), the value does not consider the skipped elements, so we must add the number of skipped elements to the index.
  • Loading branch information
richardhenry committed Mar 12, 2024
1 parent 1f3cd5b commit 0ab4156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/command_info_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl CommandInfoManager {
.iter()
.skip(*start_from as usize - 1)
.position(|arg| arg.as_slice() == keyword.as_bytes())
.map(|i| i + 1)
.map(|i| i + *start_from as usize)
} else {
slice
.iter()
Expand Down

0 comments on commit 0ab4156

Please sign in to comment.