mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Remove lockfile only when last app instance is destroyed
This commit is contained in:
committed by
Vladimir Golovnev
parent
667d4e4211
commit
144956a209
@@ -95,7 +95,7 @@ namespace QtLP_Private
|
||||
|
||||
const char* QtLocalPeer::ack = "ack";
|
||||
|
||||
QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
|
||||
QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
|
||||
: QObject(parent)
|
||||
, id(appId)
|
||||
{
|
||||
@@ -135,8 +135,11 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
|
||||
|
||||
QtLocalPeer::~QtLocalPeer()
|
||||
{
|
||||
lockFile.unlock();
|
||||
lockFile.remove();
|
||||
if (!isClient())
|
||||
{
|
||||
lockFile.unlock();
|
||||
lockFile.remove();
|
||||
}
|
||||
}
|
||||
|
||||
bool QtLocalPeer::isClient()
|
||||
|
||||
Reference in New Issue
Block a user