Skip to content

Commit

Permalink
fix for republishing to the new reconnected session
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris-Plato committed Feb 28, 2024
1 parent e61228a commit fb560ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _examples/pubsub/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ func publish(sessions chan chan session, messages <-chan message) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()

pending := make(chan message, 1)

for session := range sessions {
var (
running bool
reading = messages
pending = make(chan message, 1)
confirm = make(chan amqp.Confirmation, 1)
)

Expand Down

0 comments on commit fb560ec

Please sign in to comment.