The logic of this code part is valid, but is is also quite complicated. E.g. it does not care about initial strategies if <code>timeoutType=="elastic"</code>, etc. BTW, the flow checks the strategy for absolute timeout...
BTW, it is a legacy code, so there's no need to change it.