From 9c708474df75ef63a55bda1ef911b2356f15f6e6 Mon Sep 17 00:00:00 2001 From: Reuben Bond Date: Wed, 25 Oct 2023 16:06:10 -0700 Subject: [PATCH] Ensure that exceptions thrown from Connection tasks are observed --- src/Orleans.Core/Networking/ConnectionManager.cs | 2 +- src/Orleans.Runtime/Networking/ConnectionListener.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orleans.Core/Networking/ConnectionManager.cs b/src/Orleans.Core/Networking/ConnectionManager.cs index a0a9e7a33a..de06ae2e48 100644 --- a/src/Orleans.Core/Networking/ConnectionManager.cs +++ b/src/Orleans.Core/Networking/ConnectionManager.cs @@ -325,7 +325,7 @@ private void StartConnection(SiloAddress address, Connection connection) ThreadPool.UnsafeQueueUserWorkItem(state => { var (t, address, connection) = ((ConnectionManager, SiloAddress, Connection))state; - _ = t.RunConnectionAsync(address, connection); + t.RunConnectionAsync(address, connection).Ignore(); }, (this, address, connection)); } diff --git a/src/Orleans.Runtime/Networking/ConnectionListener.cs b/src/Orleans.Runtime/Networking/ConnectionListener.cs index 98c37facb4..3205e810f1 100644 --- a/src/Orleans.Runtime/Networking/ConnectionListener.cs +++ b/src/Orleans.Runtime/Networking/ConnectionListener.cs @@ -142,7 +142,7 @@ private void StartConnection(Connection connection) ThreadPool.UnsafeQueueUserWorkItem(state => { var (t, connection) = ((ConnectionListener, Connection))state; - _ = t.RunConnectionAsync(connection); + t.RunConnectionAsync(connection).Ignore(); }, (this, connection)); }