mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Remove lockfile only when last app instance is destroyed
This commit is contained in:
parent
667d4e4211
commit
144956a209
1 changed files with 6 additions and 3 deletions
|
@ -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()
|
||||
{
|
||||
if (!isClient())
|
||||
{
|
||||
lockFile.unlock();
|
||||
lockFile.remove();
|
||||
}
|
||||
}
|
||||
|
||||
bool QtLocalPeer::isClient()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue