Эх сурвалжийг харах

fix: 捕获InterruptedException后中断线程

zengweijie 3 жил өмнө
parent
commit
b6a731b678

+ 2 - 2
src/main/java/com/inspur/smsb/gateway/filter/LicenseFilter.java

@@ -135,9 +135,9 @@ public class LicenseFilter implements GlobalFilter, Ordered, InitializingBean, D
             while (checkSysLocked()) {
                 try {
                     Thread.sleep(Duration.ofMinutes(STEP).toMillis());
-                } catch (InterruptedException e) {// NOSONAR
+                } catch (InterruptedException e) {
                     log.error(e.getMessage(), e);
-                    break;
+                    Thread.currentThread().interrupt();
                 }
             }
             threadPoolTaskExecutor.shutdown();