Fix wrong timeout calculation that was added in the commit: a87e7df1.