You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What could be done in order for the command window to close when the Topshelf service is disposed? I'm not able to find any information on that in the Topshelf documentation. Say, the "Admin.Service.exe" is running, I want to stop it, so I go to the window hosting it and press CTRL+C. This shuts down the service, but the executable is still running (e.g. I can see it in Task Manager). How can I avoid that?
Thanks! And great project, it gave me lots of insight on microservices in .Net.
The text was updated successfully, but these errors were encountered:
Running it locally, I can't repro the problem you're having.
In program.cs the line: s.WhenStopped(tc => tc.Stop());
should catch the Ctrl+C and call the stop method in the Admin Service class.
That Stop() method simply calls webApp.Dispose();
So I suspect the Dispose() method is not finishing. Is it possible you have a long running request in your service that is not returning, which in turn is keeping a thread running?
Hi,
What could be done in order for the command window to close when the Topshelf service is disposed? I'm not able to find any information on that in the Topshelf documentation. Say, the "Admin.Service.exe" is running, I want to stop it, so I go to the window hosting it and press CTRL+C. This shuts down the service, but the executable is still running (e.g. I can see it in Task Manager). How can I avoid that?
Thanks! And great project, it gave me lots of insight on microservices in .Net.
The text was updated successfully, but these errors were encountered: