This commit is contained in:
JustArchi
2016-07-28 18:27:01 +02:00
parent efd7fbd3c0
commit 5611694b90

View File

@@ -76,8 +76,8 @@ namespace ArchiSteamFarm {
}
public void Dispose() {
ServiceHost?.Close();
Client?.Close();
StopServer();
}
internal bool IsServerRunning() => ServiceHost != null;
@@ -113,7 +113,14 @@ namespace ArchiSteamFarm {
return;
}
ServiceHost.Close();
if (ServiceHost.State != CommunicationState.Closed) {
try {
ServiceHost.Close();
} catch (Exception e) {
Logging.LogGenericException(e);
}
}
ServiceHost = null;
}