summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2019-05-07 12:49:08 +0500
committerSunil Nimmagadda <sunil@nimmagadda.net>2019-05-07 12:49:08 +0500
commit46120d6e615371d1a08609379af4b1fc578faf66 (patch)
tree6ecdb4bf79ebda5bd5101b122161cf461c082041
parent4e2ded41821675c3c4c6c93c91a3ec0f3bee6478 (diff)
Check if session is still valid.
-rw-r--r--filter_rspamd.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/filter_rspamd.go b/filter_rspamd.go
index 5b5a1a1..d326b09 100644
--- a/filter_rspamd.go
+++ b/filter_rspamd.go
@@ -224,7 +224,9 @@ func main() {
payload: &strings.Builder{}}
fallthrough
default:
- registry[event].fn(sessions[id], fields)
+ if sessions[id] != nil {
+ registry[event].fn(sessions[id], fields)
+ }
}
}
}