mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Don't count network service requests in metrics
This commit is contained in:
parent
c9b89ef2ea
commit
455b1c8bba
1 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"github.com/safing/portbase/api"
|
||||
"github.com/safing/portbase/config"
|
||||
"github.com/safing/portbase/metrics"
|
||||
"github.com/safing/portmaster/process"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -105,6 +106,13 @@ func (conn *Connection) addToMetrics() {
|
|||
return
|
||||
}
|
||||
|
||||
// Don't count requests serviced to the network,
|
||||
// as we have an incomplete view here.
|
||||
if conn.Process() != nil &&
|
||||
conn.Process().Pid == process.NetworkHostProcessID {
|
||||
return
|
||||
}
|
||||
|
||||
// Only count outgoing connections for now.
|
||||
if conn.Inbound {
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue