Hello, I have encountered a bug. When the network is unstable, the downloader will try to reconnect. Before reconnecting, the old file stream is not closed, causing this file to be occupied all the time.
This bug can be reproduced by:
Download a large file
Open the network immediately after closing the network (simulating network instability)
After the download is complete, only call downlaoder.stop without closing the application process
Try to delete the downloaded file, it will prompt that the deletion is unsuccessful
I have submitted a revised version of the code, passed the above test, please pass the review!
Hello, I have encountered a bug. When the network is unstable, the downloader will try to reconnect. Before reconnecting, the old file stream is not closed, causing this file to be occupied all the time. This bug can be reproduced by:
I have submitted a revised version of the code, passed the above test, please pass the review!