mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
[Plugin] Pass down ctx and use it (#2626)
* Pass down cancellable context and update http plugin * Use context where we can
This commit is contained in:
parent
bfc92ca1c5
commit
d1bfaddb69
5 changed files with 5 additions and 7 deletions
|
@ -26,7 +26,7 @@ func (m *GRPCClient) Notify(ctx context.Context, notification *protobufs.Notific
|
|||
done := make(chan error)
|
||||
go func() {
|
||||
_, err := m.client.Notify(
|
||||
context.Background(), &protobufs.Notification{Text: notification.Text, Name: notification.Name},
|
||||
ctx, &protobufs.Notification{Text: notification.Text, Name: notification.Name},
|
||||
)
|
||||
done <- err
|
||||
}()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue