Skip to content

Commit f316838

Browse files
authored
Merge branch 'davidfowl:main' into nickbreese/fix-relative-uri
2 parents 4e629d2 + 336929d commit f316838

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

samples/ServerApplication/Program.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ public static async Task Main(string[] args)
7171
}
7272

7373
var tcs = new TaskCompletionSource<object>();
74-
Console.CancelKeyPress += (sender, e) => tcs.TrySetResult(null);
74+
Console.CancelKeyPress += (sender, e) =>
75+
{
76+
tcs.TrySetResult(null);
77+
e.Cancel = true;
78+
};
79+
7580
await tcs.Task;
7681

7782
await server.StopAsync();

0 commit comments

Comments
 (0)