File tree 1 file changed +7
-12
lines changed
1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -281,18 +281,15 @@ where
281
281
authority_form ( req. uri_mut ( ) ) ;
282
282
}
283
283
284
- let fut = pooled
284
+ let mut res = pooled
285
285
. send_request_retryable ( req)
286
- . map_err ( ClientError :: map_with_reused ( pooled. is_reused ( ) ) ) ;
286
+ . await
287
+ . map_err ( ClientError :: map_with_reused ( pooled. is_reused ( ) ) ) ?;
287
288
288
289
// If the Connector included 'extra' info, add to Response...
289
- let extra_info = pooled. conn_info . extra . clone ( ) ;
290
- let fut = fut. map_ok ( move |mut res| {
291
- if let Some ( extra) = extra_info {
292
- extra. set ( res. extensions_mut ( ) ) ;
293
- }
294
- res
295
- } ) ;
290
+ if let Some ( extra) = & pooled. conn_info . extra {
291
+ extra. set ( res. extensions_mut ( ) ) ;
292
+ }
296
293
297
294
// As of [email protected] , there is a race condition in the mpsc
298
295
// channel, such that sending when the receiver is closing can
@@ -302,11 +299,9 @@ where
302
299
// To counteract this, we must check if our senders 'want' channel
303
300
// has been closed after having tried to send. If so, error out...
304
301
if pooled. is_closed ( ) {
305
- return fut . await ;
302
+ return Ok ( res ) ;
306
303
}
307
304
308
- let mut res = fut. await ?;
309
-
310
305
// If pooled is HTTP/2, we can toss this reference immediately.
311
306
//
312
307
// when pooled is dropped, it will try to insert back into the
You can’t perform that action at this time.
0 commit comments