mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
Remove lockfile only when last app instance is destroyed
This commit is contained in:
parent
e74ad86f14
commit
50ddfea617
1 changed files with 6 additions and 3 deletions
|
@ -135,10 +135,13 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
|
||||||
}
|
}
|
||||||
|
|
||||||
QtLocalPeer::~QtLocalPeer()
|
QtLocalPeer::~QtLocalPeer()
|
||||||
|
{
|
||||||
|
if (!isClient())
|
||||||
{
|
{
|
||||||
lockFile.unlock();
|
lockFile.unlock();
|
||||||
lockFile.remove();
|
lockFile.remove();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool QtLocalPeer::isClient()
|
bool QtLocalPeer::isClient()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue