Skip to content

Commit

Permalink
Adb.exe stays resident on QZ exit (Windows) (Issue #1951) (#1953)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein authored Jan 5, 2024
1 parent ab3071a commit 463c349
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/nordictrackifitadbtreadmill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,19 @@ void nordictrackifitadbtreadmill::changeInclinationRequested(double grade, doubl
bool nordictrackifitadbtreadmill::connected() { return true; }

void nordictrackifitadbtreadmill::stopLogcatAdbThread() {
qDebug() << "stopLogcatAdbThread()";

initiateThreadStop();
logcatAdbThread->quit();
logcatAdbThread->terminate();

#ifdef Q_OS_WIN32
QProcess process;
QString command = "/c wmic process where name='adb.exe' delete";
process.start("cmd.exe", QStringList(command.split(' ')));
process.waitForFinished(-1); // will wait forever until finished
#endif

logcatAdbThread->wait();
}

Expand Down

0 comments on commit 463c349

Please sign in to comment.