Merge a43d000cd2
into d8efd39694
This commit is contained in:
commit
7b2518da70
1 changed files with 3 additions and 0 deletions
|
@ -43,15 +43,18 @@ type TCPProxy struct {
|
|||
// Get returns the TCPServer to use
|
||||
func (p *TCPProxy) Get(host string) *TCPServer {
|
||||
if p.ServerList == nil {
|
||||
glog.V(4).Infof("using default proxy")
|
||||
return p.Default
|
||||
}
|
||||
|
||||
for _, s := range p.ServerList {
|
||||
if s.Hostname == host {
|
||||
glog.V(4).Infof("using non-default proxy")
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
glog.V(4).Infof("using default proxy")
|
||||
return p.Default
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue