As if he slept before the imam

If he sees as if he fell asleep before the imam, then he is safe from what he has risked himself, because sleeping with him is equal to himself, and it is a risk .