Repository navigation
Commit 82a9d25
committed
ingress: pass context with event bus to SMTP mail parser
The SMTP session handler calls ParseMail with context.Background()
which does not carry the EventBus. When Commit() tries to enqueue
pending events, it dereferences a nil pointer and panics. The --stdin
and --mbox paths already use the proper context.
Store the context (with the bus) in the backend struct and pass it
through to ParseMail.
Fixes: bc70c37 ("events: add event bus")
Signed-off-by: Robin Jarry <robin@jarry.cc>1 parent 243ed59 commit 82a9d25
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
226 | | - | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
0 commit comments