mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
[SocketApi] Ensure listener still exists
This commit is contained in:
parent
868b05f25b
commit
12ae1e97c6
1 changed files with 3 additions and 1 deletions
|
@ -388,8 +388,10 @@ void SocketApi::slotReadSocket()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (indexOfMethod != -1) {
|
if (indexOfMethod != -1) {
|
||||||
|
// to ensure that listener is still valid we need to call it with Qt::DirectConnection
|
||||||
|
ASSERT(thread() == QThread::currentThread())
|
||||||
staticMetaObject.method(indexOfMethod)
|
staticMetaObject.method(indexOfMethod)
|
||||||
.invoke(this, Qt::QueuedConnection, Q_ARG(QString, argument),
|
.invoke(this, Qt::DirectConnection, Q_ARG(QString, argument),
|
||||||
Q_ARG(SocketListener *, listener));
|
Q_ARG(SocketListener *, listener));
|
||||||
} else {
|
} else {
|
||||||
qCWarning(lcSocketApi) << "The command is not supported by this version of the client:" << command << "with argument:" << argument;
|
qCWarning(lcSocketApi) << "The command is not supported by this version of the client:" << command << "with argument:" << argument;
|
||||||
|
|
Loading…
Reference in a new issue