Using this behavior Topshelf freezes the thread, where an unhandled exception occurred. And this prevents the whole application from working correctly. In this case, it's better to crash the application and restart it.
I'm not sure why exactly, but this doesn't work well under Mono. The process still is terminated, but without error code.
Currently, Topshelf attempts to prevent the process crashing on unhandled exception (by using an infinite cycle in the unhandled exceptions handler event) https://github.com/Topshelf/Topshelf/blob/master/src/Topshelf/Hosts/ConsoleRunHost.cs#L163
Sometimes, this behavior makes the program work incorrectly. Is it possible to make an option to turn this behavior off?