1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-04 06:45:45 +02:00

libnm: add small delay for connectivity changed

The primary connection signal from libnm is triggered way too soon,
before the routes added, causing generally the first requests to
failed with some socket error. Delaying this a bit helps the first
requests to pass successfully.

Change-Id: I09551ff748ac503dde187c0c937b9405cd33a914
This commit is contained in:
Sébastien Blin 2022-08-10 10:36:39 -04:00
parent a161b350dc
commit 17041f780f

View file

@ -35,6 +35,7 @@
#include <QMenu>
#include <QQmlContext>
#include <QResource>
#include <QTimer>
#include <QTranslator>
#include <QLibraryInfo>
#include <QQuickWindow>
@ -165,7 +166,7 @@ MainApplication::init()
#endif
connect(connectivityMonitor_.get(), &ConnectivityMonitor::connectivityChanged, [this] {
lrcInstance_->connectivityChanged();
QTimer::singleShot(500, this, [&]() { lrcInstance_->connectivityChanged(); });
});
connect(this, &QGuiApplication::focusWindowChanged, [this] {