summaryrefslogtreecommitdiff
path: root/src/net/http/httputil/reverseproxy.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/httputil/reverseproxy.go')
-rw-r--r--src/net/http/httputil/reverseproxy.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/http/httputil/reverseproxy.go b/src/net/http/httputil/reverseproxy.go
index 26a668b6df..ecee0f242a 100644
--- a/src/net/http/httputil/reverseproxy.go
+++ b/src/net/http/httputil/reverseproxy.go
@@ -285,13 +285,13 @@ type maxLatencyWriter struct {
dst writeFlusher
latency time.Duration
- lk sync.Mutex // protects Write + Flush
+ mu sync.Mutex // protects Write + Flush
done chan bool
}
func (m *maxLatencyWriter) Write(p []byte) (int, error) {
- m.lk.Lock()
- defer m.lk.Unlock()
+ m.mu.Lock()
+ defer m.mu.Unlock()
return m.dst.Write(p)
}
@@ -306,9 +306,9 @@ func (m *maxLatencyWriter) flushLoop() {
}
return
case <-t.C:
- m.lk.Lock()
+ m.mu.Lock()
m.dst.Flush()
- m.lk.Unlock()
+ m.mu.Unlock()
}
}
}