add faster shutdown point in unix socket listener
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
b1182fe8a4
commit
50cadbee96
1 changed files with 4 additions and 1 deletions
|
@ -106,7 +106,10 @@ async fn accepted(
|
||||||
trace!(?socket, ?handler, "serving connection");
|
trace!(?socket, ?handler, "serving connection");
|
||||||
|
|
||||||
// bug on darwin causes all results to be errors. do not unwrap this
|
// bug on darwin causes all results to be errors. do not unwrap this
|
||||||
_ = builder.serve_connection(socket, handler).await;
|
tokio::select! {
|
||||||
|
() = server.until_shutdown() => (),
|
||||||
|
_ = builder.serve_connection(socket, handler) => (),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn init(server: &Arc<Server>) -> Result<UnixListener> {
|
async fn init(server: &Arc<Server>) -> Result<UnixListener> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue