mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix: do not return an error in memory-usage command (#2405)
Fixes #2399 Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
148073dbce
commit
6e6dc2c3c8
1 changed files with 3 additions and 2 deletions
|
@ -283,9 +283,10 @@ void MemoryCmd::Usage(std::string_view key) {
|
|||
}
|
||||
});
|
||||
|
||||
auto* rb = static_cast<RedisReplyBuilder*>(cntx_->reply_builder());
|
||||
if (memory_usage < 0)
|
||||
return cntx_->SendError(kKeyNotFoundErr);
|
||||
cntx_->SendLong(memory_usage);
|
||||
return rb->SendNull();
|
||||
rb->SendLong(memory_usage);
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue