Skip to content

Commit a29ad71

Browse files
committed
Fix logging edge case.
1 parent 583d6ab commit a29ad71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

loader/src/main/java/com/fox2code/foxloader/launcher/LoggerHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ private static class DirectFileHandler extends StreamHandler {
265265
@Override
266266
public synchronized void publish(LogRecord record) {
267267
super.publish(record);
268-
flush();
268+
if (!Thread.currentThread().isInterrupted()) {
269+
this.flush();
270+
}
269271
}
270272
}
271273

0 commit comments

Comments
 (0)