Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
* origin/main:
  fixed that reconnect example code actually panics and cannot really do recovery .
  • Loading branch information
Keruspe committed Jul 14, 2023
2 parents 5fc73de + 44c0e8f commit f3fdbc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/reconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ async fn rabbit_stuff(addr: String) -> Result<()> {
async_global_executor::spawn(async move {
info!("will consume");
while let Some(delivery) = consumer.next().await {
let delivery = delivery.expect("error in consumer");
delivery.ack(BasicAckOptions::default()).await.expect("ack");
let delivery = delivery?;
delivery.ack(BasicAckOptions::default()).await?;
}
Ok::<(), lapin::Error>(())
})
.detach();

Expand Down

0 comments on commit f3fdbc4

Please sign in to comment.