marcoCasamento / Hangfire.Redis.StackExchange

HangFire Redis storage based on original (and now unsupported) Hangfire.Redis but using lovely StackExchange.Redis client
Other
452 stars 108 forks source link

Better handling removed servers in RedisMonitoringApi.Servers() #94

Closed tsu1980 closed 4 years ago

tsu1980 commented 4 years ago

When I call IMonitoringApi.Servers() immediately after stop hangfire server, sometimes System.ArgumentNullException occurred like below.

System.ArgumentNullException: Value cannot be null. (Parameter 's')
   at System.Int32.Parse(String s)
   at Hangfire.Redis.RedisMonitoringApi.<>c__DisplayClass15_0.<Servers>b__2(String x)
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at Hangfire.Redis.RedisMonitoringApi.<Servers>b__15_0(IDatabase redis)
   at Hangfire.Redis.RedisMonitoringApi.Servers()

So This is better handling the removed servers in IMonitoringApi.Servers().

marcoCasamento commented 4 years ago

Thanks for you PR!