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