diff --git a/Discord Media Loader.Application/Classes/Core.cs b/Discord Media Loader.Application/Classes/Core.cs
index f96a1d2..e73cde4 100644
--- a/Discord Media Loader.Application/Classes/Core.cs
+++ b/Discord Media Loader.Application/Classes/Core.cs
@@ -128,7 +128,12 @@ namespace DML.Application.Classes
Logger.Debug("Creating discord client...");
- Client = new DiscordSocketClient();
+ var config = new DiscordSocketConfig()
+ {
+ DefaultRetryMode = RetryMode.AlwaysRetry,
+ };
+
+ Client = new DiscordSocketClient(config);
Client.Log += (arg) =>
{
var logMessage = $"DiscordClient: {arg.Message}";
@@ -160,7 +165,7 @@ namespace DML.Application.Classes
Client.Connected += Client_Connected;
- while (Client.LoginState != LoginState.LoggedIn && !abort)
+ while ((Client.LoginState != LoginState.LoggedIn || Client.ConnectionState!=ConnectionState.Connected) && !abort)
{
Logger.Debug(Client.ConnectionState.ToString());
Logger.Debug(Client.LoginState.ToString());
@@ -176,6 +181,7 @@ namespace DML.Application.Classes
{
Logger.Debug("Trying to login with last known token...");
await Client.LoginAsync(TokenType.User, Settings.LoginToken);
+ await Client.StartAsync();
await Task.Delay(1000);
}
diff --git a/Discord Media Loader.Application/DML.Application.csproj b/Discord Media Loader.Application/DML.Application.csproj
index 1662b67..fa96c36 100644
--- a/Discord Media Loader.Application/DML.Application.csproj
+++ b/Discord Media Loader.Application/DML.Application.csproj
@@ -208,10 +208,6 @@
{02c1f8ef-32f2-4e77-a36d-79129402af37}
SweetLib
-
- {4db264a7-2352-4057-b3de-61fcfec01ae5}
- DML.AppCore
-
diff --git a/Discord Media Loader.sln b/Discord Media Loader.sln
index f3279eb..7fed432 100644
--- a/Discord Media Loader.sln
+++ b/Discord Media Loader.sln
@@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DML.Application", "Discord
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SweetLib", "..\SweetLib\SweetLib\SweetLib.csproj", "{02C1F8EF-32F2-4E77-A36D-79129402AF37}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DML.AppCore", "DML.AppCore\DML.AppCore.csproj", "{4DB264A7-2352-4057-B3DE-61FCFEC01AE5}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -29,10 +27,6 @@ Global
{02C1F8EF-32F2-4E77-A36D-79129402AF37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02C1F8EF-32F2-4E77-A36D-79129402AF37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02C1F8EF-32F2-4E77-A36D-79129402AF37}.Release|Any CPU.Build.0 = Release|Any CPU
- {4DB264A7-2352-4057-B3DE-61FCFEC01AE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4DB264A7-2352-4057-B3DE-61FCFEC01AE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4DB264A7-2352-4057-B3DE-61FCFEC01AE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4DB264A7-2352-4057-B3DE-61FCFEC01AE5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Discord Media Loader/Discord Media Loader.csproj b/Discord Media Loader/Discord Media Loader.csproj
index 336e17d..0977fa7 100644
--- a/Discord Media Loader/Discord Media Loader.csproj
+++ b/Discord Media Loader/Discord Media Loader.csproj
@@ -214,10 +214,6 @@
{c130de6a-3237-42b5-be9f-783d1cd104c6}
DML.Application
-
- {4db264a7-2352-4057-b3de-61fcfec01ae5}
- DML.AppCore
-