Some minor transfer updates

This commit is contained in:
WolverinDEV
2020-08-01 11:34:24 +02:00
parent 669b3ae349
commit e9388e5e5e
6 changed files with 52 additions and 27 deletions
+2 -2
View File
@@ -483,7 +483,7 @@ void LocalFileTransfer::execute_disk_io(const std::shared_ptr<FileClient> &clien
if(buffer_left_size > 0) {
this->enqueue_disk_io(client);
} else if(client->state == FileClient::STATE_DISCONNECTING) {
} else if(client->state == FileClient::STATE_FLUSHING) {
this->test_disconnecting_state(client);
}
@@ -493,7 +493,7 @@ void LocalFileTransfer::execute_disk_io(const std::shared_ptr<FileClient> &clien
client->add_network_read_event(false);
}
} else if(client->transfer->direction == Transfer::DIRECTION_DOWNLOAD) {
if(client->state == FileClient::STATE_DISCONNECTING) {
if(client->state == FileClient::STATE_FLUSHING) {
client->flush_disk_buffer(); /* just in case, file download usually don't write to the disk */
return;
}