aboutsummaryrefslogtreecommitdiff
path: root/src/p2pool
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2pool')
-rw-r--r--src/p2pool/P2PoolManager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/p2pool/P2PoolManager.cpp b/src/p2pool/P2PoolManager.cpp
index ccfe4f94..7f9e2a4f 100644
--- a/src/p2pool/P2PoolManager.cpp
+++ b/src/p2pool/P2PoolManager.cpp
@@ -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)