File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1199,16 +1199,11 @@ impl Runtime {
1199
1199
match session. runtime . whatami ( ) {
1200
1200
WhatAmI :: Client => {
1201
1201
let runtime = session. runtime . clone ( ) ;
1202
- let cancellation_token = runtime. get_cancellation_token ( ) ;
1203
-
1204
- session. runtime . spawn ( async move {
1202
+ session. runtime . spawn_abortable ( async move {
1205
1203
let retry_config = runtime. get_global_connect_retry_config ( ) ;
1206
1204
let mut period = retry_config. period ( ) ;
1207
1205
while runtime. start_client ( ) . await . is_err ( ) {
1208
- tokio:: select! {
1209
- _ = tokio:: time:: sleep( period. next_duration( ) ) => { }
1210
- _ = cancellation_token. cancelled( ) => { break ; }
1211
- }
1206
+ tokio:: time:: sleep ( period. next_duration ( ) ) . await ;
1212
1207
}
1213
1208
} ) ;
1214
1209
}
You can’t perform that action at this time.
0 commit comments