mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
handle ctrl-c shutdown
This commit is contained in:
parent
3cd799a744
commit
eff8570f59
@ -112,7 +112,9 @@ async fn run_http(data: Data, opt: Opt, enable_frontend: bool) -> Result<(), Box
|
|||||||
.wrap(middleware::Logger::default())
|
.wrap(middleware::Logger::default())
|
||||||
.wrap(middleware::Compress::default())
|
.wrap(middleware::Compress::default())
|
||||||
.wrap(middleware::NormalizePath::new(TrailingSlash::Trim))
|
.wrap(middleware::NormalizePath::new(TrailingSlash::Trim))
|
||||||
});
|
})
|
||||||
|
// Disable signals allows the server to terminate immediately when a user enter CTRL-C
|
||||||
|
.disable_signals();
|
||||||
|
|
||||||
if let Some(config) = opt.get_ssl_config()? {
|
if let Some(config) = opt.get_ssl_config()? {
|
||||||
http_server
|
http_server
|
||||||
|
Loading…
Reference in New Issue
Block a user