shinrich commented on code in PR #10576:
URL: https://github.com/apache/trafficserver/pull/10576#discussion_r1350912063


##########
proxy/http/ConnectingEntry.cc:
##########
@@ -152,13 +152,12 @@ ConnectingEntry::state_http_server_open(int event, void 
*data)
 void
 ConnectingEntry::remove_entry()
 {
-  EThread *ethread = this_ethread();
-  auto ip_iter     = ethread->connecting_pool->m_ip_pool.find(this->ipaddr);
-  while (ip_iter != ethread->connecting_pool->m_ip_pool.end() && this->ipaddr 
== ip_iter->first) {
+  EThread *ethread            = this_ethread();
+  auto [iter_start, iter_end] = 
ethread->connecting_pool->m_ip_pool.equal_range(this->ipaddr);

Review Comment:
   So using equal_range is the key to the fix?  equal_range will use the 
IpHelper compare operator that now includes the port and the IP address.  The 
original find() will also use the ip address and port, but the ipaddr 
comparison in the while loop will not.
   
   Assuming I'm understanding that correctly, the changes look good to me.



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