mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Fix connection type switches
This commit is contained in:
parent
60bdea7c50
commit
04d633a196
2 changed files with 4 additions and 4 deletions
|
@ -548,10 +548,10 @@ func (conn *Connection) delete() {
|
|||
// A connection without an ID has been created from
|
||||
// a DNS request rather than a packet. Choose the correct
|
||||
// connection store here.
|
||||
if conn.ID == "" {
|
||||
dnsConns.delete(conn)
|
||||
} else {
|
||||
if conn.Type == IPConnection {
|
||||
conns.delete(conn)
|
||||
} else {
|
||||
dnsConns.delete(conn)
|
||||
}
|
||||
|
||||
conn.Meta().Delete()
|
||||
|
|
|
@ -132,7 +132,7 @@ func (conn *Connection) addToMetrics() {
|
|||
}
|
||||
|
||||
// Only count successful connections, not DNS requests.
|
||||
if conn.ID == "" {
|
||||
if conn.Type == DNSRequest {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue