-
Notifications
You must be signed in to change notification settings - Fork 524
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
abstract class BaseClientService supposed to be thread-safe, but is not #592
Comments
Hi, Is there any progress on this issue? |
Hi.. sorry for the huge delay...
It's a breaking change to the library. I'm a little bit concerned about it, but it will definitely fix the problem. We should solve it in the next weeks, if we break the API we will introduce it in 1.10. I'll consider out options with jtattermusch@ Am I missing something? What are your thoughts about my suggestion geroj@? Thanks! |
Solve googleapis#592. Change the API of ConfigurableMessageHandler to expose an enumerable of handlers and interceptors and NOT a list.
I just committed #617. So I'm closing this one |
Reopening this one, since we are still debating if we should break the existing API, with changing the return value of the list form IList to IEnumerable. |
In googleapis#617, I presented a new breaking change to the library. With this change we are going to avoid that, by adding back the list getter, which is OBSOLETE now.
Unbreaking change to ConfigurableMessageHandler (#592)
I just submitted the change that isn't going to a introduce any breaking change in the coming release. We are safe to close this issue now. |
Thank you for this fix! When is it going to be released? I understand that this change will be in version 1.10 |
It was just released earlier this week. |
Great, nice present for Christmas! |
short description:
BaseClientService expose List Service.HttpClient.MessageHandler.ExceptionHandlers.Add(this);
This list can be accessed from several threads and cause application to crash.
long description:
I got several exceptions, when I used InsertMediaUpload request from namespace Google.Apis.Storage.v1 from multiple threads.
This class implements ResumableUpload, where entire upload is done.
Each exception was found in calling method UploadCoreAsync:
or
or
Problem is in this part of code(method UploadCoreAsync) :
using (var callback = new ServerErrorCallback(this))
{
}
ServerErrorCallback is working with List ExceptionHandlers exposed by BaseClientService
Owner.Service.HttpClient.MessageHandler.UnsuccessfulResponseHandlers.Add(this);
Owner.Service.HttpClient.MessageHandler.ExceptionHandlers.Add(this);
Internal implementation (ConfigurableMessageHandler) is using List, so when I called code in UploadCoreAsync from several threads, it caused List to crash.
The text was updated successfully, but these errors were encountered: