From 39f3ee01900a93823050902dfc162c1150edbc68 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 15 Dec 2016 20:26:02 +0100 Subject: [PATCH] Try 2 times --- src/NadekoBot/ShardedDiscordClient.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/ShardedDiscordClient.cs b/src/NadekoBot/ShardedDiscordClient.cs index 59d6d776..892bc6d8 100644 --- a/src/NadekoBot/ShardedDiscordClient.cs +++ b/src/NadekoBot/ShardedDiscordClient.cs @@ -90,10 +90,15 @@ namespace NadekoBot await c.ConnectAsync().ConfigureAwait(false); _log.Info($"Shard #{c.ShardId} connected."); } - catch (Exception ex) + catch { _log.Error($"Shard #{c.ShardId} FAILED CONNECTING."); - _log.Error(ex); + try { await c.ConnectAsync().ConfigureAwait(false); } + catch (Exception ex2) + { + _log.Error($"Shard #{c.ShardId} FAILED CONNECTING TWICE."); + _log.Error(ex2); + } } } }