Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in FetchDataTask [1.7.6] #1200

Open
mseroczynski opened this issue Mar 25, 2019 · 8 comments
Open

Bug in FetchDataTask [1.7.6] #1200

mseroczynski opened this issue Mar 25, 2019 · 8 comments
Assignees
Labels
Milestone

Comments

@mseroczynski
Copy link

I am using BaseDownloadTask and manage queue on my own. Every one of these items is correctly configured NOT TO use multi-connection (because of encryption with FileBufferedOutputStream), even though i can't download them because of below condition:

            if (hostRunnable != null && !isSupportSeek) {
                throw new IllegalAccessException(
                        "can't using multi-download when the output stream can't support seek");
            }

Why using hostRunnable crashes out entire downloading (no multi-connection)? Can this be fixed soon?

@rantianhua rantianhua self-assigned this Jun 24, 2019
@rantianhua
Copy link
Collaborator

So you custom OutputStreamCreator and you don't support seek? if so, you need custom a ConnectionCountAdapter and force connection count to 1.

@mseroczynski
Copy link
Author

mseroczynski commented Aug 21, 2019

Shouldn't it be logic implemented in library itself?

Are you 100% sure there is nothing to do in library and task should be closed? @rantianhua

@rantianhua
Copy link
Collaborator

Oh, sorry with my misoperation. I'm asking you the way you use FileDownloader.

@rantianhua rantianhua reopened this Aug 22, 2019
@rantianhua
Copy link
Collaborator

rantianhua commented Aug 22, 2019

So, can you show me how do you custom the OutputStreamCreator ?

@rantianhua
Copy link
Collaborator

rantianhua commented Aug 22, 2019

You said:

Every one of these items is correctly configured NOT TO use multi-connection

How do you configure items don't use multi-connection?

@mseroczynski
Copy link
Author

I'm using my OutputStreamCreator to encrypt on the fly but aren't you supposed to disable multi connection for all downloads with isSeekable = false?

@rantianhua
Copy link
Collaborator

Actually, Filedownloader will use single connection if the output stream doesn't support seek:

    private boolean isMultiConnectionAvailable() {
        //noinspection SimplifiableIfStatement
        if (isResumeAvailableOnDB && model.getConnectionCount() <= 1) {
            return false;
        }

        return acceptPartial && supportSeek && !isChunked;
    }

So, I need the whole FileDownloader log to check what's the problem.

@mseroczynski
Copy link
Author

mseroczynski commented Dec 3, 2019

//            if (hostRunnable != null && !isSupportSeek) {
//                throw new IllegalAccessException(
//                        "can't using multi-download when the output stream can't support seek");
//            }

This code breaks it. It throws an exception even though i'm NOT using multi-download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants