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

resume after Error #229

Closed
sajadshokri opened this issue Jul 25, 2016 · 2 comments
Closed

resume after Error #229

sajadshokri opened this issue Jul 25, 2016 · 2 comments

Comments

@sajadshokri
Copy link

if a task has faced error and i call currentTask.start() an exception rises:

Caused by: java.lang.IllegalStateException: This task is dirty to restart, If you want to reuse this task, please invoke #reuse method manually and retry to restart again.

and if i call reuse there will be another exception:

java.lang.IllegalStateException: the messenger is working, can't re-appointment for 538416338@com.liulishuo.filedownloader.FileDownloadTask@1990b258

what else should i do?

@Jacksgong
Copy link
Collaborator

Jacksgong commented Jul 25, 2016

Thanks for your issue. Through bellow exception:

java.lang.IllegalStateException: the messenger is working, can't re-appointment for 538416338@com.liulishuo.filedownloader.FileDownloadTask@1990b258

because you invoke reuse in the FileDownloadListener#error method, and FileDownloader makes the task's messenger free after the error message arrived, it means the messenger is freed after FileDownloadListener#error invoked.


I will free the messenger before message arrived in next version.

@Jacksgong
Copy link
Collaborator

Fixed since 0.3.4.

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

No branches or pull requests

2 participants