mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 10:37:06 -07:00
- Improved downloadThread aborting support
This commit is contained in:
parent
e6554db498
commit
7c48afd6eb
1 changed files with 5 additions and 1 deletions
|
@ -139,8 +139,12 @@ class downloadThread : public QThread {
|
|||
while(!url_stream.eof()) {
|
||||
url_stream.read(cbuf, sizeof(cbuf));
|
||||
len = url_stream.gcount();
|
||||
if(len > 0){
|
||||
if(len > 0)
|
||||
dest_file.write(cbuf, len);
|
||||
if(abort){
|
||||
dest_file.close();
|
||||
url_stream.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
dest_file.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue