Wrapper: Listen for Windows Service shutdown events and shutdown router hard.

As a result, event log will now show "shutdown" instead of "crashed".
This commit is contained in:
zzz
2015-12-11 15:13:40 +00:00
parent 2852383e4e
commit 2d1ac7b266
2 changed files with 36 additions and 6 deletions

View File

@@ -160,8 +160,7 @@ public class ConfigServiceHandler extends FormHandler {
* @since 0.8.13
*/
synchronized static void registerSignalHandler(RouterContext ctx) {
if (ctx.hasWrapper() && _wrapperListener == null &&
!SystemVersion.isWindows()) {
if (ctx.hasWrapper() && _wrapperListener == null) {
String wv = System.getProperty("wrapper.version");
if (wv != null && VersionComparator.comp(wv, LISTENER_AVAILABLE) >= 0) {
try {