aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-01-07 20:40:22 -0800
committerAustin Hellyer <[email protected]>2017-01-07 20:42:13 -0800
commit83b29d5f839cd2ea6cd150aa7b8ccbbc677c1fad (patch)
treeb689937322eafdfe022621c421ffd3a6a34140b7 /src/client
parentAdd Rohrkatze Blue to Colour struct (diff)
downloadserenity-83b29d5f839cd2ea6cd150aa7b8ccbbc677c1fad.tar.xz
serenity-83b29d5f839cd2ea6cd150aa7b8ccbbc677c1fad.zip
Fix shard boot index
Diffstat (limited to 'src/client')
-rw-r--r--src/client/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index 3910a02..88a5ba4 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -782,11 +782,11 @@ impl Client {
let gateway_url = rest::get_gateway()?.url;
- for i in 0..shard_data.map_or(1, |x| x[1] + 1) {
+ for i in shard_data.map_or(0, |x| x[0])..shard_data.map_or(1, |x| x[1] + 1) {
let shard = Shard::new(&gateway_url,
- &self.token,
- shard_data.map(|s| [i, s[2]]),
- self.login_type);
+ &self.token,
+ shard_data.map(|s| [i, s[2]]),
+ self.login_type);
match shard {
Ok((shard, ready, receiver)) => {
self.shards.push(Arc::new(Mutex::new(shard)));