Added mainloop event and failure tolerance for event handlers.
Added mainloop event and failure tolerance for event handlers.

severin31/suplemon,richrd/suplemon,richrd/suplemon,trylle/suplemon,twolfson/suplemon,twolfson/suplemon