We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25ab2dc commit b2c9c8fCopy full SHA for b2c9c8f
example_apps/tutorial_app/src/ui.rs
@@ -73,13 +73,14 @@ where
73
74
loop {
75
let (stream, _) = select! {
76
- result = listener.accept() => result?,
+ biased;
77
_ = &mut shutdown => {
78
- tokio::time::timeout(Duration::from_secs(2), shutdown_handle.shutdown())
79
- .await
80
- .map_err(|_| TimeoutError)?;
81
- return Ok(());
+ tokio::time::timeout(Duration::from_secs(2), shutdown_handle.shutdown())
+ .await
+ .map_err(|_| TimeoutError)?;
+ return Ok(());
82
}
83
+ result = listener.accept() => result?,
84
};
85
86
let conn = Builder::new().serve_connection(TokioIo::new(stream), make_svc.clone());
0 commit comments