-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect exitcode in SIGTERM and SIGINT. #6215
Conversation
@@ -80,7 +80,8 @@ public async Task StartAsync() | |||
} | |||
if (_exposePort is not null) | |||
{ | |||
IMetricServer metricServer = new KestrelMetricServer(_exposePort.Value); | |||
// KestrelMetricServer intercept SIGTERM causing exitcode to be incorrect | |||
IMetricServer metricServer = new MetricServer(_exposePort.Value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any implications because of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing its a bit spower compared to kestral. Metrics seems to still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It disables non system grafana metrics for Windows 😢
As it uses HttpListener and you need to explicitly give it permissions (outside in OS) to listen on that port or run in Admin mode.
Perhaps switch on OS as I assume Windows isn't paying attention to SIGTERM
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing