plugin/forward: make Yield not block (#3336)
* plugin/forward: may Yield not block Yield may block when we're super busy with creating (and looking) for connection. Set a small timeout on Yield, to skip putting the connection back in the queue. Use persistentConn troughout the socket handling code to be more consistent. Signed-off-by: Miek Gieben <miek@miek.nl> Dont do Signed-off-by: Miek Gieben <miek@miek.nl> * Set used in Yield This gives one central place where we update used in the persistConns Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
7b69dfebb5
commit
2d98d520b5
8 changed files with 53 additions and 105 deletions
|
@ -66,7 +66,7 @@ func (p *Proxy) Down(maxfails uint32) bool {
|
|||
}
|
||||
|
||||
// close stops the health checking goroutine.
|
||||
func (p *Proxy) close() { p.probe.Stop() }
|
||||
func (p *Proxy) stop() { p.probe.Stop() }
|
||||
func (p *Proxy) finalizer() { p.transport.Stop() }
|
||||
|
||||
// start starts the proxy's healthchecking.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue