aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/proxy_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-10-01 16:39:42 +0100
committerGravatar GitHub <noreply@github.com> 2019-10-01 16:39:42 +0100
commit2d98d520b5c75d31e37dfe72a67b39707a56dc69 (patch)
tree2a7863ba64ec1e3ec6af7b4f8842b1d5b2f68ac5 /plugin/forward/proxy_test.go
parent7b69dfebb595fe08bc1fcf52234880da79d4e1aa (diff)
downloadcoredns-2d98d520b5c75d31e37dfe72a67b39707a56dc69.tar.gz
coredns-2d98d520b5c75d31e37dfe72a67b39707a56dc69.tar.zst
coredns-2d98d520b5c75d31e37dfe72a67b39707a56dc69.zip
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>
Diffstat (limited to 'plugin/forward/proxy_test.go')
-rw-r--r--plugin/forward/proxy_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/forward/proxy_test.go b/plugin/forward/proxy_test.go
index 7075e1133..b962f561b 100644
--- a/plugin/forward/proxy_test.go
+++ b/plugin/forward/proxy_test.go
@@ -35,7 +35,7 @@ func TestProxyClose(t *testing.T) {
go func() { p.Connect(ctx, state, options{}) }()
go func() { p.Connect(ctx, state, options{forceTCP: true}) }()
- p.close()
+ p.stop()
}
}