Always terminate local heartbeat when there's an error.