PragmaTwice commented on code in PR #1842:
URL: https://github.com/apache/kvrocks/pull/1842#discussion_r1367152335


##########
src/server/worker.cc:
##########
@@ -322,6 +327,10 @@ Status Worker::AddConnection(redis::Connection *c) {
   return Status::OK();
 }
 
+std::map<int, redis::Connection *> Worker::GetConnection() {
+  return std::move(conns_);

Review Comment:
   Is it intentional to clear `conns_` after this function? IMHO it is weird to 
move class field in a getter function.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to