Fixed #1513 sync shared timer

This commit is contained in:
Greg Wilkins 2017-04-28 10:25:29 +02:00 committed by Joakim Erdfelt
parent d2ee6bdf08
commit 108fd25086
1 changed files with 4 additions and 1 deletions

View File

@ -212,7 +212,10 @@ public class RolloverFileOutputStream extends FilterOutputStream
{ {
_rollTask = new RollTask(); _rollTask = new RollTask();
midnight = nextMidnight(midnight); midnight = nextMidnight(midnight);
__rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli()); synchronized(RolloverFileOutputStream.class)
{
__rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli());
}
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */