File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments