mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
Use immutable reference of service state. Update awc dns resolver. (#1905)
This commit is contained in:
@ -60,7 +60,7 @@ pub async fn test_server_with_addr<F: ServiceFactory<TcpStream>>(
|
||||
|
||||
// run server in separate thread
|
||||
thread::spawn(move || {
|
||||
let sys = System::new("actix-test-server");
|
||||
let sys = System::new();
|
||||
let local_addr = tcp.local_addr().unwrap();
|
||||
|
||||
let srv = Server::build()
|
||||
@ -69,7 +69,7 @@ pub async fn test_server_with_addr<F: ServiceFactory<TcpStream>>(
|
||||
.disable_signals();
|
||||
|
||||
sys.block_on(async {
|
||||
srv.start();
|
||||
srv.run();
|
||||
tx.send((System::current(), local_addr)).unwrap();
|
||||
});
|
||||
|
||||
@ -106,7 +106,6 @@ pub async fn test_server_with_addr<F: ServiceFactory<TcpStream>>(
|
||||
|
||||
Client::builder().connector(connector).finish()
|
||||
};
|
||||
actix_tls::connect::start_default_resolver().await.unwrap();
|
||||
|
||||
TestServer {
|
||||
addr,
|
||||
|
Reference in New Issue
Block a user