This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch NewAPIMetricsPOC in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit b31db5b743003b6b7522b880985e45882501ee85 Author: Masakazu Kitajo <[email protected]> AuthorDate: Tue Jul 11 00:21:33 2023 +0900 Don't use std::min when we don't care which value is smaller (#9973) --- proxy/http2/Http2ConnectionState.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 4d7800ab17..fb594a9ce3 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1728,7 +1728,7 @@ Http2ConnectionState::restart_streams() // Call send_response_body() for each streams while (s != end) { Http2Stream *next = static_cast<Http2Stream *>(s->link.next ? s->link.next : stream_list.head); - if (std::min(this->get_peer_rwnd(), s->get_peer_rwnd()) > 0) { + if (this->get_peer_rwnd() > 0 && s->get_peer_rwnd() > 0) { SCOPED_MUTEX_LOCK(lock, s->mutex, this_ethread()); s->restart_sending(); } @@ -1738,7 +1738,7 @@ Http2ConnectionState::restart_streams() // The above stopped at end, so we need to call send_response_body() one // last time for the stream pointed to by end. - if (std::min(this->get_peer_rwnd(), s->get_peer_rwnd()) > 0) { + if (this->get_peer_rwnd() > 0 && s->get_peer_rwnd() > 0) { SCOPED_MUTEX_LOCK(lock, s->mutex, this_ethread()); s->restart_sending(); }
