(&mut self)
| 478 | |
| 479 | #[instrument(skip(self))] |
| 480 | async fn stop_vm(&mut self) { |
| 481 | if tokio::time::timeout( |
| 482 | tokio::time::Duration::from_secs(15), |
| 483 | self.run_until_completion(), |
| 484 | ) |
| 485 | .await |
| 486 | .is_err() |
| 487 | { |
| 488 | self.guild_logger.log(CreateLogEntry::error( |
| 489 | "shutting down your vm timed out after 15 sec, cancelling all pending promises \ |
| 490 | and force-shutting down now instead..." |
| 491 | .to_string(), |
| 492 | )); |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | async fn run_until_completion(&mut self) { |
| 497 | loop { |
no test coverage detected