Skip to content

Commit

Permalink
Use already existing context for queue publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
eest committed Nov 29, 2024
1 parent d209942 commit 14e65e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/runner/mqtt.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package runner

import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
Expand Down Expand Up @@ -121,7 +120,7 @@ func (edm *dnstapMinimiser) runAutoPaho(cm *autopaho.ConnectionManager, topic st
}

if usingFileQueue {
err = cm.PublishViaQueue(context.Background(), &autopaho.QueuePublish{
err = cm.PublishViaQueue(edm.autopahoCtx, &autopaho.QueuePublish{
Publish: &paho.Publish{
QoS: 0,
Topic: topic,
Expand Down

0 comments on commit 14e65e1

Please sign in to comment.