From eb476ee287dee0781bfec824cbc6dd71d61ae3de Mon Sep 17 00:00:00 2001 From: BClood Date: Sat, 4 Jan 2025 17:37:13 +0900 Subject: [PATCH] fix: hello command not return information of pika version --- src/pika_admin.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pika_admin.cc b/src/pika_admin.cc index 3c0cf13b1..dd2b871c2 100644 --- a/src/pika_admin.cc +++ b/src/pika_admin.cc @@ -3387,8 +3387,12 @@ void HelloCmd::Do() { } std::string raw; + char version[32]; + snprintf(version, sizeof(version), "%d.%d.%d", PIKA_MAJOR, PIKA_MINOR, PIKA_PATCH); + std::vector fvs{ {"server", "redis"}, + {"version", version} }; // just for redis resp2 protocol fvs.push_back({"proto", "2"});