Setting timeout explicitly only if timeout is greater than 0