tasks.join_next => join_all()
This commit is contained in:
+1
-5
@@ -80,11 +80,7 @@ impl Bot {
|
||||
|
||||
// When all webhook tasks have completed, we can safely exit
|
||||
// properly before returning
|
||||
while let Some(res) = tasks.join_next().await {
|
||||
if let Err(e) = res {
|
||||
error!("Task panicked: {e}");
|
||||
}
|
||||
}
|
||||
tasks.join_all().await;
|
||||
|
||||
info!("Bot shutting down, channel closed");
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user