.NET Windows Service with timer stops responding

前端 未结 7 958
猫巷女王i
猫巷女王i 2020-11-30 05:17

I have a windows service written in c#. It has a timer inside, which fires some functions on a regular basis. So the skeleton of my service:

public partial cl         


        
7条回答
  •  萌比男神i
    2020-11-30 05:39

    unhandled exceptions in timers are swallowed, and they silently kill the timer

    wrap the body of your timer code in a try-catch block

提交回复
热议问题