Skip to content

Commit 8bab5d9

Browse files
committed
Simplify
1 parent a73f6d8 commit 8bab5d9

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

dnscrypt-proxy/hot_reload.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ func (proxy *Proxy) InitHotReload() error {
1818
// Add query plugins
1919
proxy.pluginsGlobals.RLock()
2020
if proxy.pluginsGlobals.queryPlugins != nil {
21-
for _, plugin := range *proxy.pluginsGlobals.queryPlugins {
22-
plugins = append(plugins, plugin)
23-
}
21+
plugins = append(plugins, *proxy.pluginsGlobals.queryPlugins...)
2422
}
2523

2624
// Add response plugins
2725
if proxy.pluginsGlobals.responsePlugins != nil {
28-
for _, plugin := range *proxy.pluginsGlobals.responsePlugins {
29-
plugins = append(plugins, plugin)
30-
}
26+
plugins = append(plugins, *proxy.pluginsGlobals.responsePlugins...)
3127
}
3228
proxy.pluginsGlobals.RUnlock()
3329

dnscrypt-proxy/plugin_cache.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ type CachedResponse struct {
2020

2121
type CachedResponses struct {
2222
cache *sievecache.ShardedSieveCache[[32]byte, CachedResponse]
23-
cacheMu sync.Mutex
2423
cacheOnce sync.Once
2524
}
2625

0 commit comments

Comments
 (0)