diff --git a/server/lualib/connmgr/netstats.go b/server/lualib/connmgr/netstats.go index 39366fd1..8005d89e 100644 --- a/server/lualib/connmgr/netstats.go +++ b/server/lualib/connmgr/netstats.go @@ -24,10 +24,11 @@ import ( "sync" "time" - config "github.com/croessner/nauthilus/server/config" + "github.com/croessner/nauthilus/server/config" "github.com/croessner/nauthilus/server/global" "github.com/croessner/nauthilus/server/log" "github.com/croessner/nauthilus/server/util" + "github.com/go-kit/log/level" psnet "github.com/shirou/gopsutil/v4/net" "github.com/yuin/gopher-lua" @@ -255,6 +256,10 @@ func (m *ConnectionManager) UpdateCounts() { for _, conn := range connections { var addr psnet.Addr + if conn.Status != "ESTABLISHED" { + continue + } + if info.Direction == "local" { addr = conn.Laddr } else {