Enhancements on handling the heart beat and connection resets