Hi,My service is deployed as a windows service. It has been configured to restart on error. I am on 3.1.0 from nuget.Theres a bug lurking in some library code I use and cannot getaway from which, under certain circumstances, raises an exception from the threadpool. When this happens, the host detects it and shuts down my serivice. However, the SCM does not restart the service, I suspect because it thinks it was a graceful shutdown. Heres my host program:static int Main(string[] args)
{
return (int)HostFactory.Run(x =>
{
x.UseNLog();x.Service<SyncHostContainer>(s =>
{
s.ConstructUsing(name => new SyncHostContainer());
s.WhenStarted(tc => tc.Start());
s.WhenStopped(tc => tc.Stop());
});x.RunAsLocalSystem();x.SetDescription("blah");
x.SetDisplayName("blah");
x.SetServiceName("blah");
});
}I have had a little dig in the service host and I see it hooking up the unhandled exception event and shutting sown if it occurs. I can't see it assigning an error code anywhere though. I am also curious about the thread sleep for an hour, so any info about that would be good.Cheers--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.