From 6433bf8c4bd832cff23f2be23e0b869cf8118b72 Mon Sep 17 00:00:00 2001 From: Alireza Hakimrabet Date: Fri, 24 May 2024 03:46:19 +0330 Subject: [PATCH] GH-388: add non blocking sleeper - fix (https://github.com/spring-projects/spring-retry/issues/388) - add non blocking sleeper --- .../org/springframework/retry/backoff/NonBlockingSleeper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/retry/backoff/NonBlockingSleeper.java b/src/main/java/org/springframework/retry/backoff/NonBlockingSleeper.java index 5728cd58..a58a960a 100644 --- a/src/main/java/org/springframework/retry/backoff/NonBlockingSleeper.java +++ b/src/main/java/org/springframework/retry/backoff/NonBlockingSleeper.java @@ -34,7 +34,7 @@ public void sleep(long backOffPeriod) throws InterruptedException { try { TimeUnit.MILLISECONDS.sleep(backOffPeriod); } - catch (Exception e) { + catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BackOffInterruptedException("Thread interrupted while sleeping", e); }