diff --git a/CHANGES.md b/CHANGES.md index df577a99..f0f7cd7e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Changes +## 0.6.4 (2018-05-11) + +* Fix segfault in ServerSettings::get_response_builder() + + ## 0.6.3 (2018-05-10) * Add `Router::with_async()` method for async handler registration. diff --git a/Cargo.toml b/Cargo.toml index 24a50051..6fd07355 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-web" -version = "0.6.3" +version = "0.6.4" authors = ["Nikolay Kim "] description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust." readme = "README.md" diff --git a/src/server/settings.rs b/src/server/settings.rs index cd17681b..f75033c1 100644 --- a/src/server/settings.rs +++ b/src/server/settings.rs @@ -16,7 +16,6 @@ use body::Body; use httpresponse::{HttpResponse, HttpResponseBuilder, HttpResponsePool}; /// Various server settings -#[derive(Clone)] pub struct ServerSettings { addr: Option, secure: bool, @@ -28,6 +27,18 @@ pub struct ServerSettings { unsafe impl Sync for ServerSettings {} unsafe impl Send for ServerSettings {} +impl Clone for ServerSettings { + fn clone(&self) -> Self { + ServerSettings { + addr: self.addr, + secure: self.secure, + host: self.host.clone(), + cpu_pool: self.cpu_pool.clone(), + responses: HttpResponsePool::pool(), + } + } +} + struct InnerCpuPool { cpu_pool: UnsafeCell>, }