Example #1
0
        protected override void OnHandleDestroyed(EventArgs e)
        {
            base.OnHandleDestroyed(e);

            _process.Kill();
            _inServer.Dispose();
            _outServer.Dispose();
        }
Example #2
0
 private void OnDestroy()
 {
     if (_outServer != null)
     {
         _outServer.Dispose();
     }
     if (_inServer != null)
     {
         _inServer.Dispose();
     }
 }
Example #3
0
        //shut down by timer, in case of client crash/hang
        private void _exitTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                log.Info("Exiting by timer,timeout:" + _exitTimer.Interval);
                log.Info("==============SHUTTING DOWN==========");

                _mainWorker.Shutdown();

                _memServer.Dispose();


                _inCommServer.Dispose();
                _outCommServer.Dispose();

                IsRunning = false;
            }
            catch (Exception ex)
            {
                log.Info("Exception on shutdown:" + ex.StackTrace);
            }
        }