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 05f1e4b commit b6b8366Copy full SHA for b6b8366
osrdyne/src/main.rs
@@ -156,7 +156,11 @@ async fn main() -> Result<(), anyhow::Error> {
156
157
// stop workers. shutdown is not graceful, as the system is expected
158
// to be capable to handle interuptions and network partitions at any time.
159
- // tasks.shutdown().await;
+ if let Err(_) = tokio::time::timeout(Duration::from_secs(10), tasks.shutdown()).await {
160
+ // This should never happen. If we fail to abort the task in a reasonable time,
161
+ // the process is probably in a weird state and we should let the OS clean it up.
162
+ panic!("failed to stop workers in time");
163
+ }
164
165
// TODO: don't retry in a tight loop, log something
166
}
0 commit comments