mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-15 18:08:30 -07:00
coredns plugin -- Fix deadlock during coredns reload
This commit is contained in:
parent
0440ef016a
commit
2c84cd6448
@ -210,10 +210,10 @@ func (r *dayTop) addEntry(entry *logEntry, now time.Time) error {
|
||||
func loadTopFromFiles() error {
|
||||
now := time.Now()
|
||||
runningTop.RLock()
|
||||
defer runningTop.RUnlock()
|
||||
if runningTop.loaded {
|
||||
return nil
|
||||
}
|
||||
defer runningTop.RUnlock()
|
||||
onEntry := func(entry *logEntry) error {
|
||||
err := runningTop.addEntry(entry, now)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user