frankvicky commented on code in PR #16156: URL: https://github.com/apache/kafka/pull/16156#discussion_r1625253815
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java: ########## @@ -293,12 +293,10 @@ private void closeInternal(final Duration timeout) { * Check the unsent queue one last time and poll until all requests are sent or the timer runs out. */ private void sendUnsentRequests(final Timer timer) { - if (networkClientDelegate.unsentRequests().isEmpty()) - return; - do { + while (timer.notExpired() && networkClientDelegate.hasAnyPendingRequests()) { Review Comment: Hi @lianetm, thank you for pointing out this potential bug, I will fix it. 🙇🏼 -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org