فهرست منبع

remove all teh locks!

Dan Frank 13 سال پیش
والد
کامیت
89123289aa
1فایلهای تغییر یافته به همراه0 افزوده شده و 3 حذف شده
  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}
 }