Closed autukill closed 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 问题
请更新下,看问题解决了没有。
问题描述:
系统定时在 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 问题