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"
1919
2020[dependencies ]
2121httparse = " 1.3.4"
22- async-std = " 1.7.0"
2322http-types = { version = " 2.9.0" , default-features = false }
2423futures-core = " 0.3.8"
2524log = " 0.4.11"
@@ -28,6 +27,7 @@ async-channel = "1.5.1"
2827async-dup = " 1.2.2"
2928futures-lite = " 1.13.0"
3029async-io = " 1.13.0"
30+ async-global-executor = " 2.3.1"
3131
3232[dev-dependencies ]
3333pretty_assertions = " 0.6.1"
Original file line number Diff line number Diff line change 33use std:: str:: FromStr ;
44
55use async_dup:: { Arc , Mutex } ;
6- use async_std:: task;
76use futures_lite:: io:: { AsyncRead as Read , AsyncWrite as Write , BufReader } ;
87use futures_lite:: prelude:: * ;
98use http_types:: content:: ContentLength ;
@@ -104,7 +103,7 @@ where
104103 let ( body_read_sender, body_read_receiver) = async_channel:: bounded ( 1 ) ;
105104
106105 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 {
108107 // If the client expects a 100-continue header, spawn a
109108 // task to wait for the first read attempt on the body.
110109 if let Ok ( ( ) ) = body_read_receiver. recv ( ) . await {
@@ -113,7 +112,8 @@ where
113112 // Since the sender is moved into the Body, this task will
114113 // finish when the client disconnects, whether or not
115114 // 100-continue was sent.
116- } ) ;
115+ } )
116+ . detach ( ) ;
117117 }
118118
119119 // Check for Transfer-Encoding
You can’t perform that action at this time.
0 commit comments