zhaopeiym / quartzui

基于Quartz.NET3.0的定时任务Web可视化管理。docker打包开箱即用、内置SQLite持久化、语言无关、业务代码零污染、支持 RESTful风格接口、傻瓜式配置
MIT License
1.52k stars 418 forks source link

[BUG] 执行 Http Get 任务时触发异常 #53

Closed autukill closed 3 years ago

autukill commented 3 years ago

问题描述:

系统定时在 0点 执行多个 Http Get 任务时, 触发以下异常:

` System.NullReferenceException: Object reference not set to an instance of an object.

at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)

at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)

at Host.HttpHelper.GetHttpClient(String url) in D:\worksapce\repository\quartzui\QuartzNetAPI\Host\Common\HttpHelper.cs:line 32 `

显然是多线程操作 Dictionary 问题

zhaopeiym commented 3 years ago

请更新下,看问题解决了没有。