Detect if gobject mainloop is dead and exit
Avoid endless loop and backend restart.