Commit 41a4602c authored by Nick Craver's avatar Nick Craver Committed by Nick Craver

A few await safeguards

parent 4b50c4f5
...@@ -247,7 +247,7 @@ internal async Task OnConnectedAsync(PhysicalConnection connection, TextWriter l ...@@ -247,7 +247,7 @@ internal async Task OnConnectedAsync(PhysicalConnection connection, TextWriter l
Trace("OnConnected"); Trace("OnConnected");
if (physical == connection && !isDisposed && ChangeState(State.Connecting, State.ConnectedEstablishing)) if (physical == connection && !isDisposed && ChangeState(State.Connecting, State.ConnectedEstablishing))
{ {
await ServerEndPoint.OnEstablishingAsync(connection, log); await ServerEndPoint.OnEstablishingAsync(connection, log).ForAwait();
} }
else else
{ {
......
...@@ -468,7 +468,7 @@ private async Task OnEstablishingAsyncAwaited(PhysicalConnection connection, Tas ...@@ -468,7 +468,7 @@ private async Task OnEstablishingAsyncAwaited(PhysicalConnection connection, Tas
{ {
try try
{ {
await handshake; await handshake.ForAwait();
} }
catch (Exception ex) catch (Exception ex)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment