Skip to content
Snippets Groups Projects
Commit 17041f78 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

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
parent a161b350
Branches master
No related tags found
No related merge requests found
......@@ -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] {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment