protected override void OnShutdown() { try { Supervisor.Shutdown(); } catch { } base.OnShutdown(); this.Stop(); }
protected override void OnCustomCommand(int command) { if (command == SERVICE_CONTROL_PRESHUTDOWN) { try { Supervisor.Shutdown(); } catch { } } base.OnCustomCommand(command); this.Stop(); }