Don't take the proxy mutex in the traffic path

This should make throughput better on the userspace proxier.

Fixes #11977
This commit is contained in:
Tim Hockin
2015-08-28 20:51:47 -07:00
parent d79f53f73b
commit f0a9badd2d
3 changed files with 24 additions and 3 deletions

View File

@@ -429,6 +429,9 @@ func TestTCPProxyStop(t *testing.T) {
if err != nil {
t.Fatalf("error adding new service: %#v", err)
}
if !svcInfo.isAlive() {
t.Fatalf("wrong value for isAlive(): expected true")
}
conn, err := net.Dial("tcp", joinHostPort("", svcInfo.proxyPort))
if err != nil {
t.Fatalf("error connecting to proxy: %v", err)
@@ -437,6 +440,9 @@ func TestTCPProxyStop(t *testing.T) {
waitForNumProxyLoops(t, p, 1)
stopProxyByName(p, service)
if svcInfo.isAlive() {
t.Fatalf("wrong value for isAlive(): expected false")
}
// Wait for the port to really close.
if err := waitForClosedPortTCP(p, svcInfo.proxyPort); err != nil {
t.Fatalf(err.Error())