Freeze managed state before launch.

This commit is contained in:
Sergio Benitez 2018-04-28 18:23:01 -07:00
parent 0e85f9efd8
commit 6a31cb5f5a
2 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,7 @@ log = "0.4"
percent-encoding = "1"
toml = "0.4.2"
num_cpus = "1.0"
state = "0.4"
state = "0.4.1"
time = "0.1"
memchr = "2"
base64 = "0.9"

View File

@ -689,6 +689,9 @@ impl Rocket {
let timeout = self.config.keep_alive.map(|s| Duration::from_secs(s as u64));
server.keep_alive(timeout);
// Freeze managed state for synchronization-free accesses later.
self.state.freeze();
// Run the launch fairings.
self.fairings.handle_launch(&self);