diff options
| author | Zeyla Hellyer <[email protected]> | 2017-12-09 19:51:43 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-12-09 19:51:43 -0800 |
| commit | 65233ad6f3d002f72942aaf811514fa9d29ad068 (patch) | |
| tree | 75a4ffb6250f11a2dc5c5f03d0397b852f066cc5 /src/client/bridge/gateway/shard_runner.rs | |
| parent | Fix syntax highlighting in README (diff) | |
| download | serenity-65233ad6f3d002f72942aaf811514fa9d29ad068.tar.xz serenity-65233ad6f3d002f72942aaf811514fa9d29ad068.zip | |
Shutdown everything on ShardManager::shutdown_all
Calling `ShardManager::shutdown_all` will now send a message to the
shard queuer and shard monitor to shutdown. This will now cause
`Client::start_connection` to exit.
Additionally, `Client::start_connection` and related functions that call
this (e.g. `Client::start_autosharded`) now return `Ok(())` on clean
exits.
Diffstat (limited to 'src/client/bridge/gateway/shard_runner.rs')
| -rw-r--r-- | src/client/bridge/gateway/shard_runner.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/bridge/gateway/shard_runner.rs b/src/client/bridge/gateway/shard_runner.rs index 15712f3..6ca73eb 100644 --- a/src/client/bridge/gateway/shard_runner.rs +++ b/src/client/bridge/gateway/shard_runner.rs @@ -240,6 +240,11 @@ impl<H: EventHandler + Send + Sync + 'static> ShardRunner<H> { true }, + ShardManagerMessage::ShutdownInitiated => { + // nb: not sent here + + true + }, } ShardClientMessage::Runner(x) => match x { ShardRunnerMessage::ChunkGuilds { guild_ids, limit, query } => { |