You are right that normally that would be the case. For VizDoom in particular, there is a separate timeout that the environment itself calculates. When we set-up the environment, it is this line:
And when it is triggered then
d is set to true, and that exits the loops.
Hope that clarifies.