From 6ce89066fb2d458c3e5093140d99bb3ed22cf2bb Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Sun, 3 Apr 2016 14:40:45 -0700 Subject: [PATCH] race fix --- server/monitor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/monitor.go b/server/monitor.go index d07dda22..0ca495de 100644 --- a/server/monitor.go +++ b/server/monitor.go @@ -290,9 +290,9 @@ func (s *Server) HandleRoutez(w http.ResponseWriter, r *http.Request) { RemoteID: r.route.remoteID, DidSolicit: r.route.didSolicit, IsConfigured: r.route.routeType == Explicit, - InMsgs: r.inMsgs, + InMsgs: atomic.LoadInt64(&r.inMsgs), OutMsgs: r.outMsgs, - InBytes: r.inBytes, + InBytes: atomic.LoadInt64(&r.inBytes), OutBytes: r.outBytes, NumSubs: uint32(len(r.subs)), }