soondenana commented on a change in pull request #9347:
URL: https://github.com/apache/kafka/pull/9347#discussion_r499080376



##########
File path: clients/src/main/java/org/apache/kafka/common/utils/Utils.java
##########
@@ -331,6 +331,11 @@ public static ByteBuffer wrapNullable(byte[] array) {
      */
     public static void sleep(long ms) {
         try {
+            if (ms <= 0) {
+                // No need to sleep
+                log.debug("Skipping sleep as asked to sleep for {} msec", ms);

Review comment:
       Ok, I see the point. Overflow can be caused by time arithmetic too. 
Reverted the change.




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

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


Reply via email to