Skip to content

Commit db755fa

Browse files
committed
wip
1 parent 03d4165 commit db755fa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

examples/c.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn main() {
1010
tracing_subscriber::fmt::init();
1111

1212
let addr = std::env::var("AMQP_ADDR").unwrap_or_else(|_| "amqp://127.0.0.1:5672/%2f".into());
13-
let recovery_config = lapin::RecoveryConfig::default().auto_recover_channels();
13+
let recovery_config = lapin::RecoveryConfig::default().auto_recover_connection();
1414

1515
async_global_executor::block_on(async {
1616
let conn = Connection::connect(

src/recovery_config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ impl RecoveryConfig {
1010
self.auto_recover_channels = true;
1111
self
1212
}
13+
14+
#[cfg(feature = "unstable")]
15+
pub fn auto_recover_connection(mut self) -> Self {
16+
self.auto_recover_connection = true;
17+
self.auto_recover_channels()
18+
}
1319
}

0 commit comments

Comments
 (0)