Do not re-evaluate ended connections

This commit is contained in:
Daniel 2024-04-18 13:51:20 +02:00
parent 2d45a1c712
commit 21c4fa456b

View file

@ -111,12 +111,17 @@ func resetAllConnectionVerdicts() {
func resetConnectionVerdict(ctx context.Context, conn *network.Connection) (verdictChanged bool) {
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.Lock()
defer conn.Unlock()
// Do not re-evaluate connection that have already ended.
if conn.Ended > 0 {
return false
}
// Update feature flags.
if err := conn.UpdateFeatures(); err != nil && !errors.Is(err, access.ErrNotLoggedIn) {
tracer.Warningf("filter: failed to update connection feature flags: %s", err)