Skip to content

Commit

Permalink
Merge pull request #468 from Shopify/close-broker-before-retrying
Browse files Browse the repository at this point in the history
Don't retry messages until the broker is closed
  • Loading branch information
eapache committed Jun 9, 2015
2 parents b86f862 + 5ad52d8 commit 4eeb2f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion async_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@ func (p *asyncProducer) flusher(broker *Broker, input <-chan []*ProducerMessage)
default:
Logger.Printf("producer/flusher/%d state change to [closing] because %s\n", broker.ID(), err)
p.abandonBrokerConnection(broker)
p.retryMessages(batch, err)
_ = broker.Close()
closing = err
p.retryMessages(batch, err)
continue
}

Expand Down

0 comments on commit 4eeb2f8

Please sign in to comment.