You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i would expect that the sync call should be able to complete as it does when it does not follow an async call
at this point, i don't know enough about SynchronizationContexts or the WCF internals to really understand the issue or know what is a reasonable fix, or even to tell if it could be at all related to: #4862
i found a couple of "workarounds" (as documented in the repro), but none that seem like very good options for a real application; we would like to convert all the usages in the client to async and avoid the problem that way, but it's not a trivial application, and that's not something we can do all at once
The text was updated successfully, but these errors were encountered:
we recently converted an asp.net core application to act as a nettcp wcf client (it was proxying through a REST api before)
we encountered a problem when a sync call follows an async call: the sync call times out, despite finishing quickly on the server side.
i found a few (relatively old) posts online that describe a similar problem:
https://aloiskraus.wordpress.com/2018/07/01/why-does-my-synchronous-wcf-call-hang/
https://stackoverflow.com/questions/37087103/wcf-client-hangs-on-any-operation-after-awaiting-async-operation-in-console-appl
and it does seem to be related to the SynchronizationContext (or lack thereof)
i have a small repro in a console app (which also doesn't have a SynchronizationContext) here:
https://github.com/bkindersleytrulioo/WCFDeadlock
i would expect that the sync call should be able to complete as it does when it does not follow an async call
at this point, i don't know enough about SynchronizationContexts or the WCF internals to really understand the issue or know what is a reasonable fix, or even to tell if it could be at all related to:
#4862
i found a couple of "workarounds" (as documented in the repro), but none that seem like very good options for a real application; we would like to convert all the usages in the client to async and avoid the problem that way, but it's not a trivial application, and that's not something we can do all at once
The text was updated successfully, but these errors were encountered: