Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed Jan 15, 2024
1 parent 3df2070 commit 86963fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/commands/cmd_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -862,15 +862,15 @@ class CommandXRead : public Commander,

if (block_ && results.empty()) {
if (conn->IsInExec()) {
*output = conn_->NilArray();
*output = conn->NilArray();
return Status::OK(); // No blocking in multi-exec
}

return BlockingRead(srv, conn, &stream_db);
}

if (!block_ && results.empty()) {
*output = conn_->NilArray();
*output = conn->NilArray();
return Status::OK();
}

Expand Down Expand Up @@ -976,10 +976,10 @@ class CommandXRead : public Commander,
conn_->Reply(conn_->NilArray());
}

SendReply(conn_, results);
SendReply(results);
}

void SendReply(Connection *conn, const std::vector<StreamReadResult> &results) {
void SendReply(const std::vector<StreamReadResult> &results) {
std::string output;

output.append(redis::MultiLen(results.size()));
Expand All @@ -991,7 +991,7 @@ class CommandXRead : public Commander,
for (const auto &entry : result.entries) {
output.append(redis::MultiLen(2));
output.append(redis::BulkString(entry.key));
output.append(conn->MultiBulkString(entry.values));
output.append(conn_->MultiBulkString(entry.values));
}
}

Expand Down

0 comments on commit 86963fc

Please sign in to comment.