fix program hang on program stop after uplink connection error
This commit is contained in:
parent
987854d6a2
commit
112aa3549a
1 changed files with 3 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ void Downloader::thread_run() {
|
|||
if (!this->conn->connect()) {
|
||||
std::cerr << "Error: Upload thread could not connect to the database!" << std::endl;
|
||||
this->interface.stop();
|
||||
this->interface.notify_download_halt();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +78,8 @@ void Downloader::thread_run() {
|
|||
|
||||
}
|
||||
|
||||
DEBUG_PRINT("Shutting down downloader");
|
||||
|
||||
// notify the control thread that download has halted
|
||||
this->interface.notify_download_halt();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue