Skip to content

Commit

Permalink
[collector]bugfix: close connection when common cache is timeout (#2786)
Browse files Browse the repository at this point in the history
Co-authored-by: shown <[email protected]>
Co-authored-by: aias00 <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 4da00d4 commit afe68ba
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ public Optional<C> getCache(T key, boolean refreshCache) {
}
if (cacheTime[0] + cacheTime[1] < System.currentTimeMillis()) {
log.warn("[connection common cache] is timeout, remove it, key {}.", key);
timeoutMap.remove(key);
cacheMap.remove(key);
removeCache(key);
return Optional.empty();
}
C value = cacheMap.compute(key, (k, v) -> {
Expand Down

0 comments on commit afe68ba

Please sign in to comment.