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/mod.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/mod.rs')
| -rw-r--r-- | src/client/bridge/gateway/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/bridge/gateway/mod.rs b/src/client/bridge/gateway/mod.rs index 752b015..c5410e6 100644 --- a/src/client/bridge/gateway/mod.rs +++ b/src/client/bridge/gateway/mod.rs @@ -99,6 +99,10 @@ pub enum ShardManagerMessage { /// [`ShardManager`]: struct.ShardManager.html /// [`ShardManagerMonitor`]: struct.ShardManagerMonitor.html ShutdownAll, + /// Indicator that a [`ShardManager`] has initiated a shutdown, and for the + /// component that receives this to also shutdown with no further action + /// taken. + ShutdownInitiated, } /// A message to be sent to the [`ShardQueuer`]. |