Skip to content

Commit 499002e

Browse files
authored
Merge pull request #206046 from eric-urban/patch-1
crawl stage for work item 4363194
2 parents 20658e7 + 4379329 commit 499002e

File tree

1 file changed

+6
-2
lines changed
  • articles/cognitive-services/Speech-Service/includes/how-to/remote-conversation/csharp

1 file changed

+6
-2
lines changed

articles/cognitive-services/Speech-Service/includes/how-to/remote-conversation/csharp/examples.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
author: eric-urban
33
ms.service: cognitive-services
44
ms.topic: include
5-
ms.date: 04/25/2022
5+
ms.date: 07/26/2022
66
ms.author: eur
77
ms.custom: devx-track-csharp
88
---
@@ -33,7 +33,11 @@ async Task CompleteContinuousRecognition(ConversationTranscriber recognizer, str
3333
};
3434

3535
await recognizer.StartTranscribingAsync().ConfigureAwait(false);
36-
await Task.WhenAny(finishedTaskCompletionSource.Task, Task.Delay(TimeSpan.FromSeconds(10)));
36+
37+
// Waits for completion.
38+
// Use Task.WaitAny to keep the task rooted.
39+
Task.WaitAny(new[] { finishedTaskCompletionSource.Task });
40+
3741
await recognizer.StopTranscribingAsync().ConfigureAwait(false);
3842
}
3943

0 commit comments

Comments
 (0)