fix(server): Make sleep_on_errors configurable and use it in example
This commit is contained in:
@@ -19,7 +19,10 @@ fn main() {
|
||||
.with_body(PHRASE))
|
||||
}));
|
||||
|
||||
let server = Http::new().bind(&addr, new_service).unwrap();
|
||||
let server = Http::new()
|
||||
.sleep_on_errors(true)
|
||||
.bind(&addr, new_service)
|
||||
.unwrap();
|
||||
println!("Listening on http://{} with 1 thread.", server.local_addr().unwrap());
|
||||
server.run().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user