There was an error while loading. Please reload this page.
1 parent 03d4165 commit db755faCopy full SHA for db755fa
2 files changed
examples/c.rs
@@ -10,7 +10,7 @@ fn main() {
10
tracing_subscriber::fmt::init();
11
12
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();
+ let recovery_config = lapin::RecoveryConfig::default().auto_recover_connection();
14
15
async_global_executor::block_on(async {
16
let conn = Connection::connect(
src/recovery_config.rs
@@ -10,4 +10,10 @@ impl RecoveryConfig {
self.auto_recover_channels = true;
self
}
+
+ #[cfg(feature = "unstable")]
+ pub fn auto_recover_connection(mut self) -> Self {
+ self.auto_recover_connection = true;
17
+ self.auto_recover_channels()
18
+ }
19
0 commit comments