diff --git a/driver/src/main/java/eu/cloudnetservice/driver/network/protocol/defaults/DefaultQueryPacketManager.java b/driver/src/main/java/eu/cloudnetservice/driver/network/protocol/defaults/DefaultQueryPacketManager.java index 4e6f831f0c..413a36a3d4 100644 --- a/driver/src/main/java/eu/cloudnetservice/driver/network/protocol/defaults/DefaultQueryPacketManager.java +++ b/driver/src/main/java/eu/cloudnetservice/driver/network/protocol/defaults/DefaultQueryPacketManager.java @@ -23,6 +23,7 @@ import eu.cloudnetservice.driver.network.NetworkChannel; import eu.cloudnetservice.driver.network.protocol.Packet; import eu.cloudnetservice.driver.network.protocol.QueryPacketManager; +import java.time.Duration; import java.util.Objects; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -49,7 +50,7 @@ public class DefaultQueryPacketManager implements QueryPacketManager { public DefaultQueryPacketManager(@NonNull NetworkChannel networkChannel) { this.networkChannel = networkChannel; this.waitingHandlers = Caffeine.newBuilder() - .weakValues() + .expireAfterWrite(Duration.ofHours(8)) .removalListener(this.newRemovalListener()) .build(); }