Added early completion on definite failure to timeout() too, by refactoring to combine after() and timeout() implementations