Fix a bug in disconnect()

This commit is contained in:
wh201906
2021-02-22 12:47:55 +08:00
parent fb8e1a6e1b
commit c3aafc3d31
3 changed files with 10 additions and 4 deletions
+8 -3
View File
@@ -108,9 +108,7 @@ void PM3Process::onTimeout() //when the proxmark3 client is unexpectedly termina
// qDebug()<<portInfo->isBusy();
if(!portInfo->isBusy())
{
kill();
emit PM3StatedChanged(false);
setSerialListener(false);
killPM3();
}
}
@@ -149,3 +147,10 @@ void PM3Process::setWorkingDir(const QString& dir)
// the working directory cannot be the default, or the client will failed to load the dll
this->setWorkingDirectory(dir);
}
void PM3Process::killPM3()
{
kill();
emit PM3StatedChanged(false);
setSerialListener(false);
}
+1
View File
@@ -30,6 +30,7 @@ public slots:
void reconnectPM3();
void setProcEnv(const QStringList* env);
void setWorkingDir(const QString& dir);
void killPM3();
private slots:
void onTimeout();
void onReadyRead();