Can we backport a single commit to create a v4.0.4 release?

80 views
Skip to first unread message

Graham Smith

unread,
Apr 5, 2018, 12:24:22 PM4/5/18
to topshelf-discuss
Hiya,

I have an issue where I'd like to tell TopShelf to stop the service with an error condition.  It seems with the stable v4.0.3 release, HostControl has a Stop() method that doesn't take any parameters and so calling it always results in an exit code of zero-OK.

I've tried to throw an unhandled exception and force the service to stop without an OK exit code, but it feels nasty and due to the async await tasks in my code, I have to jump through some hoops to try to get the Exception thrown on a task/thread so that TopShelf will even see the unhandled exception!

I had a look on GitHub to see how hard it would be the add this feature, and found there is already a pull request for it (https://github.com/Topshelf/Topshelf/pull/370) from May last year.  Great!  Except its been merged into the develop branch, and that looks like its working towards a new minor update (v4.1?).  It hasn't been merged into master for a 4.0.4 patch release.

I've cloned the master branch and cherry-picked the single commit from that PR, and can create a v4.0.4-MyLocalVersion NuGet package that works.  But I'm going to have trouble convincing my management to accept an internally created version of TopShelf and the need to create an internal NuGet feed to host it.

Is there any chance this small patch could be made available via NuGet as a stable package?  I can create a PR to merge into master and bump the version etc if that would help.  I just wasn't sure how far away a stable v4.1 release is, or if the project team would accept doing a backport of this small feature/ of the stable release.

Many Thanks,
Graham

Graham Smith

unread,
Apr 10, 2018, 7:59:32 AM4/10/18
to topshelf-discuss
OK.  Since there's been no response here, I've gone ahead and created the pull request: https://github.com/Topshelf/Topshelf/pull/431
Hopefully someone will either accept it, or give some feedback there...

Graham
Reply all
Reply to author
Forward
0 new messages