-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[External - Refit/Fusillade] Cannot access a disposed object. Object name: 'System.Net.Http.HttpConnection+HttpConnectionResponseContent'. #6
Comments
Hi @dorisoy, yeah I noticed that and can repro this bug now. |
Could you please try to turn off Fusillade priority management feature (activated by default) from the WebApiAttribute or the fluent api? On the other hand I'm currently working on Apizr v3.0-beta1 witch will outsource all Fusillade code from the core package to a dedicated integration one called Apizr.Integrations.Fusillade. |
👍👍👍 Thank you for your timely reply, I will use your guidance! |
Hi, @JeremyBP ,I use Apizr 1.9.0,I have an API request "GetPermissionRecordSettingAsync",when I try to send the same content twice (in case of timeout or similar), I get an "ObjectDisposedException" as follows:
[Get("/auth/user/permission/{userId}")] Task<APIResult<IList<PermissionRecordQuery>>> GetPermissionRecordSettingAsync([CacheKey] int store, int userId, CancellationToken calToken = default);
"exception": { "type": "Apizr.ApizrException
1[[DCMS.Client.Services.APIResult1[[System.Collections.Generic.IList
1[[DCMS.Client.Models.Users.PermissionRecordQuery, DCMS.Client, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], DCMS.Client, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null]]","message": "Cannot access a disposed object.\nObject name: 'System.Net.Http.HttpConnection+HttpConnectionResponseContent'.",
"stackTrace": " at Apizr.ApizrManager
1[TWebApi].ExecuteAsync[TResult] (System.Linq.Expressions.Expression
1[TDelegate] executeApiMethod, System.Threading.CancellationToken cancellationToken, Fusillade.Priority priority) [0x005e4] in :0 \n at DCMS.Client.Services.UserService.GetPermissionRecordSettingAsync (System.Action1[T] action, System.Threading.CancellationTokenSource cts) [0x0013c] in <c6379d2ab81547ef80e263b722f90018>:0 ", "innerExceptions": [ { "type": "System.ObjectDisposedException", "message": "Cannot access a disposed object.\nObject name: 'System.Net.Http.HttpConnection+HttpConnectionResponseContent'.", "stackTrace": " at System.Net.Http.HttpContent.CheckDisposed () [0x00013] in <92d3ef97a77047c9ab125ae979975a02>:0 \n at System.Net.Http.HttpContent.ReadAsStreamAsync () [0x00000] in <92d3ef97a77047c9ab125ae979975a02>:0 \n at Refit.NewtonsoftJsonContentSerializer.DeserializeAsync[T] (System.Net.Http.HttpContent content) [0x00027] in <ea3d892ff3f046868a691cc71dcbabbf>:0 \n at Refit.RequestBuilderImplementation.DeserializeContentAsync[T] (System.Net.Http.HttpResponseMessage resp, System.Net.Http.HttpContent content) [0x002d5] in <ea3d892ff3f046868a691cc71dcbabbf>:0 \n at Refit.RequestBuilderImplementation+<>c__DisplayClass14_0
2[T,TBody].b__0 (System.Net.Http.HttpClient client, System.Threading.CancellationToken ct, System.Object[] paramList) [0x003a5] in :0 \n at Apizr.ApizrManager1[TWebApi].ExecuteAsync[TResult] (System.Linq.Expressions.Expression
1[TDelegate] executeApiMethod, System.Threading.CancellationToken cancellationToken, Fusillade.Priority priority) [0x00528] in :0 ","wrapperSdkName": "appcenter.xamarin"
}
],
"wrapperSdkName": "appcenter.xamarin"
}`
The text was updated successfully, but these errors were encountered: