Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 46a8eb4

Browse files
committed
Prevent PullRequestSessionManager.StatusChanged throwing
`PullRequestSessionManager.StatusChanged` was throwing when the repository status changed because it was trying to set `initialized` when the task is already completed. Use `TrySetResult` which doesn't throw when the task has already completed.
1 parent 4a4d4e5 commit 46a8eb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.InlineReviews/Services/PullRequestSessionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async Task StatusChanged()
236236
}
237237

238238
CurrentSession = session;
239-
initialized.SetResult(null);
239+
initialized.TrySetResult(null);
240240
}
241241
catch (Exception e)
242242
{

0 commit comments

Comments
 (0)