Closed mumuyu66 closed 1 year ago
Hello @mumuyu66, could you provide the error messages you have? I don’t understand the issue if I’m being honest. Could you tell me what’s happening and what you’re expecting to do?
But based on what you said, it seems that probably the URL could be a single-use URL. If that’s the case, you would need to request a new URL and start a new download.
Hello, @hgouveia I am working on a game downloader. Some time ago, a player reported that an exception would be reported when the network is unstable. In order to reproduce this bug, I turned off the computer network during the download process, and then repaired it immediately, and then rediscovered the bug reported by the player.
On the first graph, at 83.7%, I started to shut down, and at 83.9%, the network came back.
In the second picture, after 83.9%, although the progress has been going, the background is still retrying the connection, and the retry event can always be received.
After receiving the end event, I started to unzip the file. At this time, I received an error event, as shown in Figure 3 below
Oh, okay @mumuyu66. So the issue is that it’s still attempting to retry after it has finished downloading, right?, i will look into this
Yes, the bug I want to report is this @hgouveia
@hgouveia hi, I have submitted a pull request that fixes this bug. Please review the code.
Thanks very much! @mumuyu66 i will review it and if all good i will try to publish the fix today
Hello, I encountered a bug when using the library and need your help!
When downloading large files, when the network fluctuates, there will be problems with retrying. The reproduction method is as follows:
My running code is as follows:
import { basename } from 'path'; import { parse } from 'url'; const { Throttle } = require('stream-throttle'); const { DownloaderHelper} = require('node-downloader-helper'); enum DownloaderState { idle, waiting, downloading, paused, interrupted, downloaded, checking, done, }
class DownloaderItem { private save_path: string; private url: string private filename: string private downloaded_bytes: number private total_bytes: number private state: DownloaderState private dl;
}
export { DownloaderItem, DownloaderState };