From 2eca399d4cc7e8da8837367a9a570e30eee44258 Mon Sep 17 00:00:00 2001 From: Saurabh Deoras Date: Wed, 23 Jan 2019 07:09:01 -0800 Subject: [PATCH] fix for arm32 (#5130) Signed-off-by: Saurabh Deoras --- connect/proxy/listener.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connect/proxy/listener.go b/connect/proxy/listener.go index b2021e1451..e0f20c8097 100644 --- a/connect/proxy/listener.go +++ b/connect/proxy/listener.go @@ -48,7 +48,7 @@ type Listener struct { logger *log.Logger // Gauge to track current open connections - activeConns int64 + activeConns int32 connWG sync.WaitGroup metricPrefix string metricLabels []metrics.Label @@ -228,12 +228,12 @@ func (l *Listener) handleConn(src net.Conn) { // trackConn increments the count of active conns and returns a func() that can // be deferred on to decrement the counter again on connection close. func (l *Listener) trackConn() func() { - c := atomic.AddInt64(&l.activeConns, 1) + c := atomic.AddInt32(&l.activeConns, 1) metrics.SetGaugeWithLabels([]string{l.metricPrefix, "conns"}, float32(c), l.metricLabels) return func() { - c := atomic.AddInt64(&l.activeConns, -1) + c := atomic.AddInt32(&l.activeConns, -1) metrics.SetGaugeWithLabels([]string{l.metricPrefix, "conns"}, float32(c), l.metricLabels) }