File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ edition = "2018"
19
19
20
20
[dependencies ]
21
21
httparse = " 1.3.4"
22
- async-std = " 1.7.0"
23
22
http-types = { version = " 2.9.0" , default-features = false }
24
23
futures-core = " 0.3.8"
25
24
log = " 0.4.11"
@@ -28,6 +27,7 @@ async-channel = "1.5.1"
28
27
async-dup = " 1.2.2"
29
28
futures-lite = " 1.13.0"
30
29
async-io = " 1.13.0"
30
+ async-global-executor = " 2.3.1"
31
31
32
32
[dev-dependencies ]
33
33
pretty_assertions = " 0.6.1"
Original file line number Diff line number Diff line change 3
3
use std:: str:: FromStr ;
4
4
5
5
use async_dup:: { Arc , Mutex } ;
6
- use async_std:: task;
7
6
use futures_lite:: io:: { AsyncRead as Read , AsyncWrite as Write , BufReader } ;
8
7
use futures_lite:: prelude:: * ;
9
8
use http_types:: content:: ContentLength ;
@@ -104,7 +103,7 @@ where
104
103
let ( body_read_sender, body_read_receiver) = async_channel:: bounded ( 1 ) ;
105
104
106
105
if Some ( CONTINUE_HEADER_VALUE ) == req. header ( EXPECT ) . map ( |h| h. as_str ( ) ) {
107
- task :: spawn ( async move {
106
+ async_global_executor :: spawn ( async move {
108
107
// If the client expects a 100-continue header, spawn a
109
108
// task to wait for the first read attempt on the body.
110
109
if let Ok ( ( ) ) = body_read_receiver. recv ( ) . await {
@@ -113,7 +112,8 @@ where
113
112
// Since the sender is moved into the Body, this task will
114
113
// finish when the client disconnects, whether or not
115
114
// 100-continue was sent.
116
- } ) ;
115
+ } )
116
+ . detach ( ) ;
117
117
}
118
118
119
119
// Check for Transfer-Encoding
You can’t perform that action at this time.
0 commit comments