fix: add delay

This commit is contained in:
Anna 2022-07-10 14:09:54 -04:00
parent 16ea0cb3b5
commit 4221e53f2e
1 changed files with 5 additions and 2 deletions

View File

@ -105,8 +105,11 @@ internal class PluginUi : IDisposable {
ImGui.TextUnformatted($"Status: {status}");
ImGui.SameLine();
if (ImGuiUtil.IconButton(FontAwesomeIcon.Wifi, tooltip: "Reconnect")) {
this.Plugin.Client.StopLoop();
this.Plugin.Client.StartLoop();
Task.Run(async () => {
this.Plugin.Client.StopLoop();
await Task.Delay(TimeSpan.FromSeconds(5));
this.Plugin.Client.StartLoop();
});
}
switch (status) {