LINARU ENDARU

This commit is contained in:
Cyberboss
2017-06-05 14:13:44 -04:00
parent e299c0f191
commit a107164b35
+15 -15
View File
@@ -162,26 +162,26 @@ namespace TGServerService
//noop
}
void DisconnectAndDispose()
{
try
{
client.Disconnect().Wait();
}
catch (Exception e) {
TGServerService.WriteLog("Discord failed DnD: " + e.ToString());
}
client.Dispose();
}
void DisconnectAndDispose()
{
try
{
client.Disconnect().Wait();
}
catch (Exception e) {
TGServerService.WriteLog("Discord failed DnD: " + e.ToString());
}
client.Dispose();
}
public string SetProviderInfo(TGChatSetupInfo info)
{
try
{
lock (DiscordLock)
{
DisconnectAndDispose();
Init(info);
{
DisconnectAndDispose();
Init(info);
if(Properties.Settings.Default.ChatEnabled)
Connect();
}
@@ -202,7 +202,7 @@ namespace TGServerService
{
if (disposing)
{
DisconnectAndDispose();
DisconnectAndDispose();
// TODO: dispose managed state (managed objects).
}