aboutsummaryrefslogtreecommitdiff
path: root/singleapplication_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'singleapplication_p.cpp')
-rw-r--r--singleapplication_p.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/singleapplication_p.cpp b/singleapplication_p.cpp
index 1ab58c2..70edaae 100644
--- a/singleapplication_p.cpp
+++ b/singleapplication_p.cpp
@@ -328,10 +328,12 @@ void SingleApplicationPrivate::slotConnectionEstablished()
}
);
- QObject::connect(nextConnSocket, &QLocalSocket::disconnected,
- [nextConnSocket, this](){
+ QObject::connect(nextConnSocket, &QLocalSocket::disconnected, nextConnSocket, &QLocalSocket::deleteLater);
+
+ QObject::connect(nextConnSocket, &QLocalSocket::destroyed,
+ [nextConnSocket, this](QObject *obj){
+ Q_UNUSED(obj)
connectionMap.remove(nextConnSocket);
- nextConnSocket->deleteLater();
}
);