I'm writing a simplest caller console app according to this article with core3.1. When i changed channel.Open().Wait(5000);
to await channel.Open();
, it's stucked at line proxy.Ping();
.
And this is also found on a callee:
Task openTask = channel.Open();
openTask.Wait();
can't replace with await channel.Open();
Task<IAsyncDisposable> registrationTask = realm.Services.RegisterCallee(instance);
registrationTask.Wait();
can't replace with await realm.Services.RegisterCallee(instance);
Once await is used, the program always gets stuck at line proxy.Ping();
The solution zipfile.
Why?Isn't await waiting?