Fix race condition on hosts semaphore
This commit is contained in:
parent
c527d0b885
commit
d28beca57a
@ -296,7 +296,10 @@ func (g *Geziyor) releaseSem(req *client.Request) {
|
||||
<-g.semGlobal
|
||||
}
|
||||
if g.Opt.ConcurrentRequestsPerDomain != 0 {
|
||||
<-g.semHosts.hostSems[req.Host]
|
||||
g.semHosts.RLock()
|
||||
hostSem := g.semHosts.hostSems[req.Host]
|
||||
g.semHosts.RUnlock()
|
||||
<-hostSem
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user