Add thread that checks for various kinds of disconnects and fixes them.