diff --git a/Source/IdleMaster/CookieClient.cs b/Source/IdleMaster/CookieClient.cs index 297af489..dbe0ca8e 100644 --- a/Source/IdleMaster/CookieClient.cs +++ b/Source/IdleMaster/CookieClient.cs @@ -31,9 +31,9 @@ protected override WebResponse GetWebResponse(WebRequest request, System.IAsyncR // Check, if cookie should be deleted. This means that sessionID is now invalid and user has to log in again. // Maybe this shoud be done other way (authenticate exception), but because of shared settings and timers in frmMain... - if (cookies.Count > 0) + foreach (Cookie c in cookies) { - if (cookies["steamLogin"].Value == "deleted") + if (c.Name == "steamLogin" && c.Value == "deleted") { Settings.Default.sessionid = string.Empty; Settings.Default.steamLogin = string.Empty;