Skip to content

Commit

Permalink
Merge pull request #33 from dnstapir/paho-queue-context
Browse files Browse the repository at this point in the history
Use already existing context for queue publishing
  • Loading branch information
eest authored Dec 6, 2024
2 parents d209942 + 14e65e1 commit be0f829
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 be0f829

Please sign in to comment.