Skip to content

Commit

Permalink
adding run after use
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtallcampbell committed Jul 22, 2024
1 parent 1811971 commit c0cec59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static void Main(string[] args) {
await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909");
});
});
app.Run();

// Add a middleware to catch exceptions and stop the host gracefully
app.Use(async (context, next) => {
Expand All @@ -48,5 +47,7 @@ public static void Main(string[] args) {
lifetime?.StopApplication();
}
});

app.Run();
}
}

0 comments on commit c0cec59

Please sign in to comment.