mirror of
https://github.com/safing/portmaster
synced 2025-09-01 10:09:11 +00:00
Do not re-evaluate ended connections
This commit is contained in:
parent
2d45a1c712
commit
21c4fa456b
1 changed files with 6 additions and 1 deletions
|
@ -111,12 +111,17 @@ func resetAllConnectionVerdicts() {
|
||||||
func resetConnectionVerdict(ctx context.Context, conn *network.Connection) (verdictChanged bool) {
|
func resetConnectionVerdict(ctx context.Context, conn *network.Connection) (verdictChanged bool) {
|
||||||
tracer := log.Tracer(ctx)
|
tracer := log.Tracer(ctx)
|
||||||
|
|
||||||
// Remove any active prompt as we settings are being re-evaluated.
|
// Remove any active prompt as the settings are being re-evaluated.
|
||||||
conn.RemovePrompt()
|
conn.RemovePrompt()
|
||||||
|
|
||||||
conn.Lock()
|
conn.Lock()
|
||||||
defer conn.Unlock()
|
defer conn.Unlock()
|
||||||
|
|
||||||
|
// Do not re-evaluate connection that have already ended.
|
||||||
|
if conn.Ended > 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// Update feature flags.
|
// Update feature flags.
|
||||||
if err := conn.UpdateFeatures(); err != nil && !errors.Is(err, access.ErrNotLoggedIn) {
|
if err := conn.UpdateFeatures(); err != nil && !errors.Is(err, access.ErrNotLoggedIn) {
|
||||||
tracer.Warningf("filter: failed to update connection feature flags: %s", err)
|
tracer.Warningf("filter: failed to update connection feature flags: %s", err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue