Remove connection reason when none is given in a verdict update

This commit is contained in:
Daniel 2021-09-26 13:47:58 +02:00
parent 985e979d1d
commit 67e02ecc1e

View file

@ -505,6 +505,9 @@ func (conn *Connection) SetVerdict(newVerdict Verdict, reason, reasonOptionKey s
if reasonOptionKey != "" && conn.Process() != nil { if reasonOptionKey != "" && conn.Process() != nil {
conn.Reason.OptionKey = reasonOptionKey conn.Reason.OptionKey = reasonOptionKey
conn.Reason.Profile = conn.Process().Profile().GetProfileSource(conn.Reason.OptionKey) conn.Reason.Profile = conn.Process().Profile().GetProfileSource(conn.Reason.OptionKey)
} else {
conn.Reason.OptionKey = ""
conn.Reason.Profile = ""
} }
return true return true
} }