OfficeDev / ews-managed-api

Other
584 stars 317 forks source link

Fix #45: Protect HttpResponseHeaders from being modified simultaneously #104

Closed cklam2 closed 6 years ago

cklam2 commented 7 years ago

Fix for #45, when the HttpResponseHeader is being modified by multiple threads then ArgumentException may be thrown. This fix protects modifications on the HttpResponseHeader field by a lock.

zuckerthoben commented 7 years ago

Hey guys, can you please merge the pr? I am affected by this bug.

zachberger commented 7 years ago

@zuckerthoben you can check out the repo yourself and apply the patch if you need this urgently

davster commented 6 years ago

I know that this is super late in responding, but in general, the EWS managed API is not thread safe. It seems like this kind of locking should be outside of the managed API itself.

Caltor commented 4 years ago

As people clearly want to use this multi-threaded and someone has given you a fix pro-bono, I can't see any reason why you wouldn't just merge it. Having an ExchangeService instance per thread makes splitting workloads across threads much harder.

Caltor commented 4 years ago

Fix for #45, when the HttpResponseHeader is being modified by multiple threads then ArgumentException may be thrown. This fix protects modifications on the HttpResponseHeader field by a lock.

You're an absolute legend mate!