diff options
| author | Jokler <jokler@protonmail.com> | 2020-03-14 18:41:27 +0100 |
|---|---|---|
| committer | Jokler <jokler@protonmail.com> | 2020-03-14 18:41:27 +0100 |
| commit | 4e21655346e438b74349c0911cfa261e06b82ee9 (patch) | |
| tree | 84b745cf2e2ec3d9f62219ac709a97a8c1c7ed64 /src/teamspeak/mod.rs | |
| parent | 6f9806abdbfa61583b25fd544c41a017a574686c (diff) | |
| download | pokebot-4e21655346e438b74349c0911cfa261e06b82ee9.tar.gz pokebot-4e21655346e438b74349c0911cfa261e06b82ee9.zip | |
Fix shutdown freezing the bot
This is kind of a work around by ignoring other futures spawned on the
tokio runtime but it should not cause any actual issues since the
important futures should still block the runtime.
Diffstat (limited to 'src/teamspeak/mod.rs')
| -rw-r--r-- | src/teamspeak/mod.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/teamspeak/mod.rs b/src/teamspeak/mod.rs index 7551e77..4d31f2e 100644 --- a/src/teamspeak/mod.rs +++ b/src/teamspeak/mod.rs @@ -1,5 +1,4 @@ use std::sync::{Arc, RwLock}; -use std::time::{Duration, Instant}; use futures::compat::Future01CompatExt; use futures01::{future::Future, sink::Sink}; @@ -224,9 +223,5 @@ impl TeamSpeakConnection { .disconnect(opt) .map_err(|e| error!("Failed to send message: {}", e)), ); - // Might or might not be required to keep tokio running while the bot disconnects - tokio::spawn( - tokio::timer::Delay::new(Instant::now() + Duration::from_secs(1)).map_err(|_| ()), - ); } } |
