Skip to content

Commit

Permalink
Only kill p2pool if we started it
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputeryPony committed May 10, 2022
1 parent 2e2ae5c commit c87482d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/p2pool/P2PoolManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,17 @@ bool P2PoolManager::start(const QString &flags, const QString &address, const QS
void P2PoolManager::exit()
{
qDebug("P2PoolManager: exit()");
if (started) {
#ifdef Q_OS_WIN
QProcess::execute("taskkill", {"/F", "/IM", "p2pool.exe"});
#else
QProcess::execute("pkill", {"p2pool"});
#endif
started = false;
QString dirName = QApplication::applicationDirPath() + "/stats/";
QDir dir(dirName);
dir.removeRecursively();
started = false;
QString dirName = QApplication::applicationDirPath() + "/stats/";
QDir dir(dirName);
dir.removeRecursively();
}
}

P2PoolManager::P2PoolManager(QObject *parent)
Expand Down

0 comments on commit c87482d

Please sign in to comment.