Pass both the control and data context into handle
This commit is contained in:
1 parent
8c96d3ef9b
commit
fb1ea92a30
7 files changed
+20
-21
No files matched your search
@@ -4,7 +4,6 @@
|
||||
package proxy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
@@ -22,9 +21,9 @@ func TestProxyStateHelpers(t *testing.T) {
|
||||
|
||||
t.Run("proxyConnFnCounter", func(t *testing.T) {
|
||||
assert.EqualValues(t, 0, ProxyState.CurrentProxiedConnections())
|
||||
proxyConnFnCounter(func(context.Context) {
|
||||
proxyConnFnCounter(func() {
|
||||
assert.EqualValues(t, 1, ProxyState.CurrentProxiedConnections())
|
||||
})(context.Background())
|
||||
})()
|
||||
assert.EqualValues(t, 0, ProxyState.CurrentProxiedConnections())
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user