mirror of
https://github.com/safing/portmaster
synced 2025-09-14 08:49:40 +00:00
Remove RRCache locking and clean up attributes
This commit is contained in:
parent
7b5803482c
commit
7d9454f29a
3 changed files with 46 additions and 54 deletions
|
@ -215,9 +215,7 @@ func checkCache(ctx context.Context, q *Query) *RRCache {
|
|||
// Check if the cache will expire soon and start an async request.
|
||||
if rrCache.ExpiresSoon() {
|
||||
// Set flag that we are refreshing this entry.
|
||||
rrCache.Lock()
|
||||
rrCache.requestingNew = true
|
||||
rrCache.Unlock()
|
||||
rrCache.RequestingNew = true
|
||||
|
||||
log.Tracer(ctx).Tracef(
|
||||
"resolver: cache for %s will expire in %s, refreshing async now",
|
||||
|
@ -397,7 +395,7 @@ resolveLoop:
|
|||
|
||||
// Check if we want to use an older cache instead.
|
||||
if oldCache != nil {
|
||||
oldCache.isBackup = true
|
||||
oldCache.IsBackup = true
|
||||
|
||||
switch {
|
||||
case err != nil:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue