Skip to content

Commit 0517d21

Browse files
committed
syncronize InstancePool#updateAutoClear
1 parent 8c26c1e commit 0517d21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/main/java/de/bluecolored/bluemap/core/util/InstancePool.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
*/
2525
package de.bluecolored.bluemap.core.util;
2626

27-
import de.bluecolored.bluemap.core.logger.Logger;
2827
import org.jetbrains.annotations.Nullable;
2928

3029
import java.time.Duration;
@@ -65,7 +64,7 @@ public InstancePool(Supplier<T> creator, Function<T, T> recycler, @Nullable Dura
6564
updateAutoClear();
6665
}
6766

68-
private void updateAutoClear() {
67+
private synchronized void updateAutoClear() {
6968
if (autoClearTask != null) autoClearTask.cancel();
7069
if (autoClearTime != null) {
7170
autoClearTask = new TimerTask() {

0 commit comments

Comments
 (0)