mirror of
https://github.com/umputun/reproxy.git
synced 2024-11-23 09:27:22 +03:00
Fix a deadlock
This commit is contained in:
parent
7e89e35e48
commit
38af32f37c
@ -42,12 +42,11 @@ func (h *Http) healthHandler(w http.ResponseWriter, _ *http.Request) {
|
||||
if m.PingURL == "" {
|
||||
continue
|
||||
}
|
||||
sema <- struct{}{}
|
||||
pinged++
|
||||
wg.Add(1)
|
||||
|
||||
go func(m discovery.URLMapper) {
|
||||
|
||||
sema <- struct{}{}
|
||||
defer func() {
|
||||
<-sema
|
||||
wg.Done()
|
||||
|
Loading…
Reference in New Issue
Block a user