IdentityServer / IdentityServer3.EntityFramework

EntityFramework persistence layer for IdentityServer3
Apache License 2.0
68 stars 97 forks source link

fix ConsentStore null excretion when no existing consent. #125

Open jinweijie opened 7 years ago

jinweijie commented 7 years ago

because the return type is Task, so we should return Task.FromResult(null) instead of null. Otherwise, null exception will be raised.

brockallen commented 7 years ago

The method is marked with async, so the null return is already a Task. The compiler does this.

jinweijie commented 7 years ago

Thanks Allen, but at runtime, an exception was thrown. I was using .Net framework 4.6.1. After I changing null with Task.FromResult(null), the exception was resolved. Could you check again? Thanks.