Skip to content

Commit

Permalink
internal/broker: fix clobbered context (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored Sep 20, 2023
1 parent 752dc57 commit bb61442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/broker/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type Service struct {

// NewService creates a new service.
func NewService(ctx context.Context, cfg *config.Config) (s *Service, err error) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(ctx)
var trie *message.Trie
if "mqtt" == cfg.Matcher {
trie = message.NewTrieMQTT()
Expand Down

0 comments on commit bb61442

Please sign in to comment.