//public static void CloseSafe(this IChannelUnsafe u) //{ // CompleteChannelCloseTaskSafely(u, u.CloseAsync()); //} internal static async void CompleteChannelCloseTaskSafely(object channelObject, Task closeTask) { try { await closeTask; } catch (TaskCanceledException) { } catch (Exception ex) { if (Log.DebugEnabled) { Log.FailedToCloseChannelCleanly(channelObject, ex); } } }