Try 2 times

This commit is contained in:
Kwoth 2016-12-15 20:26:02 +01:00
parent f55d3f68d3
commit 39f3ee0190

View File

@ -90,10 +90,15 @@ namespace NadekoBot
await c.ConnectAsync().ConfigureAwait(false); await c.ConnectAsync().ConfigureAwait(false);
_log.Info($"Shard #{c.ShardId} connected."); _log.Info($"Shard #{c.ShardId} connected.");
} }
catch (Exception ex) catch
{ {
_log.Error($"Shard #{c.ShardId} FAILED CONNECTING."); _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);
}
} }
} }
} }