Skip to content

Commit 6908174

Browse files
committed
Add missing lock
1 parent 287d21c commit 6908174

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

dnscrypt-proxy/proxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ func (proxy *Proxy) addLocalDoHListener(listenAddrStr string) {
242242
dlog.Fatalf("Unable to switch to a different user: %v", err)
243243
}
244244
defer listenerTCP.Close()
245+
FileDescriptorsMu.Lock()
245246
FileDescriptors = append(FileDescriptors, fdTCP)
247+
FileDescriptorsMu.Unlock()
246248
return
247249
}
248250

0 commit comments

Comments
 (0)