mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
net: shutdown async runtime on exit
This commit is contained in:
parent
34a41f57c6
commit
fa765168b9
2 changed files with 11 additions and 5 deletions
|
@ -152,7 +152,7 @@ fn create_http_states(
|
|||
http_cache_state: Mutex::new(HashMap::new()),
|
||||
client: create_http_client(
|
||||
create_tls_config(&certs, ALPN_H2_H1),
|
||||
HANDLE.lock().unwrap().executor(),
|
||||
HANDLE.lock().unwrap().as_ref().unwrap().executor(),
|
||||
),
|
||||
};
|
||||
|
||||
|
@ -165,7 +165,7 @@ fn create_http_states(
|
|||
http_cache_state: Mutex::new(HashMap::new()),
|
||||
client: create_http_client(
|
||||
create_tls_config(&certs, ALPN_H2_H1),
|
||||
HANDLE.lock().unwrap().executor(),
|
||||
HANDLE.lock().unwrap().as_ref().unwrap().executor(),
|
||||
),
|
||||
};
|
||||
|
||||
|
@ -591,6 +591,9 @@ impl CoreResourceManager {
|
|||
// or a short timeout has been reached.
|
||||
self.thread_pool.exit();
|
||||
|
||||
// Shut-down the async runtime used by fetch workers.
|
||||
drop(HANDLE.lock().unwrap().take());
|
||||
|
||||
debug!("Exited CoreResourceManager");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue