From 7d8b5f7f317ec9c8b007ec624372c458cfcddbf3 Mon Sep 17 00:00:00 2001 From: calebtt Date: Fri, 25 Sep 2026 22:45:32 -0500 Subject: [PATCH] Await the completed NOTIFY task in BlindTransferTests xUnit1031 flagged .Result on _notifyAnswered.Task. The task has already completed at that point, so nothing could deadlock, but it was the only new build warning since v0.1.2. Await it instead. Co-Authored-By: Claude Opus 5.5 --- tests/SipBotLib.Tests/BlindTransferTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SipBotLib.Tests/BlindTransferTests.cs b/tests/SipBotLib.Tests/BlindTransferTests.cs index 2734f2d..56058ce 100644 --- a/tests/SipBotLib.Tests/BlindTransferTests.cs +++ b/tests/SipBotLib.Tests/BlindTransferTests.cs @@ -143,7 +143,7 @@ public async Task Final_progress_NOTIFY_is_answered_before_the_BYE() Assert.True(transferred); Assert.True(await Within(_notifyAnswered.Task, TimeSpan.FromSeconds(5)), "the NOTIFY got no final response"); - var (status, answeredAt) = _notifyAnswered.Task.Result; + var (status, answeredAt) = await _notifyAnswered.Task; Assert.Equal(SIPResponseStatusCodesEnum.Ok, status); Assert.True(await Within(_byeAtCallee.Task, TimeSpan.FromSeconds(5)), "the transferee never received a BYE"); Assert.True(_byeAt >= answeredAt, $"BYE at {_byeAt} came before the NOTIFY was answered at {answeredAt}");