Skip to content

Commit

Permalink
bugfix: idle publishers would terminate too early
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Nov 28, 2024
1 parent 72c7571 commit afd4222
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/amqp10_client/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (p *Amqp10Publisher) StartFullSpeed(ctx context.Context) {
}

func (p *Amqp10Publisher) StartIdle(ctx context.Context) {
_ = ctx.Done()
<-ctx.Done()
}

func (p *Amqp10Publisher) StartRateLimited(ctx context.Context) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/mqtt_client/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (p MqttPublisher) StartFullSpeed(ctx context.Context) {
func (p MqttPublisher) StartIdle(ctx context.Context) {
log.Info("publisher started", "id", p.Id, "rate", "-", "destination", p.Topic)

_ = ctx.Done()
<-ctx.Done()
}

func (p MqttPublisher) StartRateLimited(ctx context.Context) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/mqtt_client/publisher_v5.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (p Mqtt5Publisher) StartFullSpeed(ctx context.Context) {
func (p Mqtt5Publisher) StartIdle(ctx context.Context) {
log.Info("publisher started", "id", p.Id, "rate", "-", "destination", p.Topic)

_ = ctx.Done()
<-ctx.Done()
}

func (p Mqtt5Publisher) StartRateLimited(ctx context.Context) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/stomp_client/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (p *StompPublisher) StartFullSpeed(ctx context.Context) {
func (p *StompPublisher) StartIdle(ctx context.Context) {
log.Info("publisher started", "id", p.Id, "rate", "-", "destination", p.Topic)

_ = ctx.Done()
<-ctx.Done()
}

func (p *StompPublisher) StartRateLimited(ctx context.Context) {
Expand Down

0 comments on commit afd4222

Please sign in to comment.