Explorar o código

remove all teh locks!

Dan Frank %!s(int64=13) %!d(string=hai) anos
pai
achega
89123289aa
Modificáronse 1 ficheiros con 0 adicións e 3 borrados
  1. 0 3
      hostpool.go

+ 0 - 3
hostpool.go

@@ -44,7 +44,6 @@ type HostPool interface {
 }
 
 type standardHostPool struct {
-	sync.RWMutex
 	hosts             map[string]HostEntry
 	initialRetryDelay time.Duration
 	maxRetryInterval  time.Duration
@@ -116,8 +115,6 @@ func (rt *realTimer) between(start time.Time, end time.Time) time.Duration {
 
 // return an upstream entry from the HostPool
 func (p *standardHostPool) Get() HostPoolResponse {
-	p.Lock()
-	defer p.Unlock()
 	host := p.getRoundRobin()
 	return &standardHostPoolResponse{host: host, pool: p}
 }