Fix
This commit is contained in:
parent
8ea62fd807
commit
d2f4cbeec1
@ -67,17 +67,11 @@ namespace NadekoBot
|
|||||||
_log.Info($"Shard #{i} initialized.");
|
_log.Info($"Shard #{i} initialized.");
|
||||||
|
|
||||||
var j = i;
|
var j = i;
|
||||||
client.Disconnected += async (ex) =>
|
client.Disconnected += (ex) =>
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
_log.Error("Shard #{0} disconnected", j);
|
_log.Error("Shard #{0} disconnected", j);
|
||||||
_log.Error(ex, ex?.Message ?? "No error");
|
_log.Error(ex, ex?.Message ?? "No error");
|
||||||
|
return Task.CompletedTask;
|
||||||
try { await client.DisconnectAsync().ConfigureAwait(false); } catch { }
|
|
||||||
await client.ConnectAsync().ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user