bneradt commented on code in PR #10688:
URL: https://github.com/apache/trafficserver/pull/10688#discussion_r1388881686


##########
src/iocore/net/UnixNetVConnection.cc:
##########
@@ -1449,6 +1455,23 @@ UnixNetVConnection::remove_from_active_queue()
   }
 }
 
+void
+UnixNetVConnection::enable_inbound_connection_tracking(std::shared_ptr<ConnectionTracker::Group>
 group)
+{
+  ink_assert(nullptr == conn_track_group);
+  conn_track_group = std::move(group);

Review Comment:
   I didn't originally write this with the move, but clang recommended it. It 
is a minor optimization and, if you think about it, it is correct. Remember 
that the move transfers the ownership from `group` to `conn_track_group` and 
leaves `group` empty (nullptr). When `group` goes out of scope later, nothing 
will happen. So this is fine. It avoids the reference count increment and then 
decrement when `group` later goes out of scope.



-- 
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