This question already has an answer here:

In a scenario where we have the following lightning payment channels:

Alice <-> Bob <-> Carol <-> Dave

Alice wants to pay Dave. Dave generates a payment request by selecting a random R and providing to Alice HASH(R).

This is routed via Bob and Carol, because Alice has no channel with Dave. It is clear that R is passed from one to another, but what happens if one hop goes suddenly down, for example Bob goes down after Carol received R from Dave.

marked as duplicate by pebwindkraft, Andrew Chow Mar 18 '18 at 21:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.