File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
crates/wasi-http/tests/all Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ async fn test(
2727}
2828
2929pub struct Server {
30+ conns : usize ,
3031 addr : SocketAddr ,
3132 worker : Option < JoinHandle < Result < ( ) > > > ,
3233}
@@ -67,6 +68,7 @@ impl Server {
6768 } )
6869 } ) ;
6970 Ok ( Self {
71+ conns,
7072 worker : Some ( worker) ,
7173 addr,
7274 } )
@@ -116,8 +118,10 @@ impl Server {
116118impl Drop for Server {
117119 fn drop ( & mut self ) {
118120 debug ! ( "shutting down http1 server" ) ;
119- // Force a connection to happen in case one hasn't happened already.
120- let _ = TcpStream :: connect ( & self . addr ) ;
121+ for _ in 0 ..self . conns {
122+ // Force a connection to happen in case one hasn't happened already.
123+ let _ = TcpStream :: connect ( & self . addr ) ;
124+ }
121125
122126 // If the worker fails with an error, report it here but don't panic.
123127 // Some tests don't make a connection so the error will be that the tcp
You can’t perform that action at this time.
0 commit comments