mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-03 06:22:56 +03:00
Pull request: all: fix some races
Updates #3087. Squashed commit of the following: commit e888ce524f286f3c34e14e0086336b65a95fa020 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon May 17 16:34:10 2021 +0300 all: fix some races
This commit is contained in:
parent
d9ae6dbcc3
commit
5acae6e204
6 changed files with 30 additions and 13 deletions
internal/home
|
@ -133,14 +133,21 @@ func handleStatus(w http.ResponseWriter, _ *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
resp := statusResponse{
|
||||
DNSAddrs: dnsAddrs,
|
||||
DNSPort: config.DNS.Port,
|
||||
HTTPPort: config.BindPort,
|
||||
IsRunning: isRunning(),
|
||||
Version: version.Version(),
|
||||
Language: config.Language,
|
||||
}
|
||||
var resp statusResponse
|
||||
|
||||
func() {
|
||||
config.RLock()
|
||||
defer config.RUnlock()
|
||||
|
||||
resp = statusResponse{
|
||||
DNSAddrs: dnsAddrs,
|
||||
DNSPort: config.DNS.Port,
|
||||
HTTPPort: config.BindPort,
|
||||
IsRunning: isRunning(),
|
||||
Version: version.Version(),
|
||||
Language: config.Language,
|
||||
}
|
||||
}()
|
||||
|
||||
var c *dnsforward.FilteringConfig
|
||||
if Context.dnsServer != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue