Implemented reconnecting to servers from database