From d2f4cbeec198688e364827adb8e1c7d6e95a6833 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 4 Jan 2017 01:16:56 +0100 Subject: [PATCH] Fix --- src/NadekoBot/ShardedDiscordClient.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/NadekoBot/ShardedDiscordClient.cs b/src/NadekoBot/ShardedDiscordClient.cs index b84cb63c..aee2af7b 100644 --- a/src/NadekoBot/ShardedDiscordClient.cs +++ b/src/NadekoBot/ShardedDiscordClient.cs @@ -67,17 +67,11 @@ namespace NadekoBot _log.Info($"Shard #{i} initialized."); var j = i; - client.Disconnected += async (ex) => + client.Disconnected += (ex) => { - try - { - _log.Error("Shard #{0} disconnected", j); - _log.Error(ex, ex?.Message ?? "No error"); - - try { await client.DisconnectAsync().ConfigureAwait(false); } catch { } - await client.ConnectAsync().ConfigureAwait(false); - } - catch { } + _log.Error("Shard #{0} disconnected", j); + _log.Error(ex, ex?.Message ?? "No error"); + return Task.CompletedTask; }; }