aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--singleapplication_p.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/singleapplication_p.cpp b/singleapplication_p.cpp
index 1ab58c2..e65bd95 100644
--- a/singleapplication_p.cpp
+++ b/singleapplication_p.cpp
@@ -328,10 +328,11 @@ void SingleApplicationPrivate::slotConnectionEstablished()
}
);
- QObject::connect(nextConnSocket, &QLocalSocket::disconnected,
+ QObject::connect(nextConnSocket, &QLocalSocket::disconnected, nextConnSocket, &QLocalSocket::deleteLater);
+
+ QObject::connect(nextConnSocket, &QLocalSocket::destroyed,
[nextConnSocket, this](){
connectionMap.remove(nextConnSocket);
- nextConnSocket->deleteLater();
}
);