Skip to content

Commit 30f014b

Browse files
committed
fix
1 parent 8a0125c commit 30f014b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Controllers/CRON/SelezenController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ async public Task<string> ParseAllTask()
141141

142142
_parseAllTaskWork = true;
143143

144-
try
144+
foreach (var val in taskParse.ToArray())
145145
{
146-
foreach (var val in taskParse.ToArray())
146+
try
147147
{
148148
if (DateTime.Today == val.updateTime)
149149
continue;
@@ -154,8 +154,8 @@ async public Task<string> ParseAllTask()
154154
if (res)
155155
val.updateTime = DateTime.Today;
156156
}
157+
catch { }
157158
}
158-
catch { }
159159

160160
_parseAllTaskWork = false;
161161
return "ok";
@@ -167,7 +167,7 @@ async public Task<string> ParseAllTask()
167167
async Task<bool> parsePage(int page)
168168
{
169169
#region Авторизация
170-
if (Cookie == null && AppInit.conf.Selezen.cookie == null)
170+
if (Cookie == null && string.IsNullOrEmpty(AppInit.conf.Selezen.cookie))
171171
{
172172
if (await TakeLogin() == false)
173173
return false;

Engine/FileDB/FileDB.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void Dispose()
167167
{
168168
val.openconnection -= 1;
169169
if (val.openconnection <= 0 && !AppInit.conf.evercache)
170-
openWriteTask.Remove(fdbkey);
170+
openWriteTask.TryRemove(fdbkey, out _);
171171
}
172172
}
173173
#endregion

Engine/FileDB/staticDB.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public partial class FileDB : IDisposable
1818
/// </summary>
1919
public static ConcurrentDictionary<string, DateTime> masterDb = new ConcurrentDictionary<string, DateTime>();
2020

21-
static Dictionary<string, WriteTaskModel> openWriteTask = new Dictionary<string, WriteTaskModel>();
21+
static ConcurrentDictionary<string, WriteTaskModel> openWriteTask = new ConcurrentDictionary<string, WriteTaskModel>();
2222

2323
static FileDB()
2424
{

0 commit comments

Comments
 (0)