You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/11/14 10:53:52 UTC

[GitHub] [incubator-kvrocks] Phoeniwx commented on a diff in pull request #1121: Fix `modernize-avoid-bind` warning reported by clang-tidy

Phoeniwx commented on code in PR #1121:
URL: https://github.com/apache/incubator-kvrocks/pull/1121#discussion_r1021350312


##########
src/cluster/cluster.cc:
##########
@@ -319,7 +319,9 @@ Status Cluster::ImportSlot(Redis::Connection *conn, int slot, int state) {
       conn->SetImporting();
       myself_->importing_slot_ = slot;
       // Set link error callback
-      conn->close_cb_ = std::bind(&SlotImport::StopForLinkError, svr_->slot_import_, conn->GetFD());
+      conn->close_cb_ = [object_ptr = svr_->slot_import_, capture_fd = conn->GetFD()](int fd) {

Review Comment:
   `conn->close_cb_ is` a `std::function<void (int)>`, so I add a `int fd`



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org