Fix
This commit is contained in:
parent
8ea62fd807
commit
d2f4cbeec1
@ -67,17 +67,11 @@ namespace NadekoBot
|
||||
_log.Info($"Shard #{i} initialized.");
|
||||
|
||||
var j = i;
|
||||
client.Disconnected += async (ex) =>
|
||||
{
|
||||
try
|
||||
client.Disconnected += (ex) =>
|
||||
{
|
||||
_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 { }
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user