diff options
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 4885b9f..50845ac 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -166,13 +166,12 @@ KAsync::Job<void> ResourceAccess::Private::tryToConnect() | |||
166 | auto counter = QSharedPointer<int>::create(0); | 166 | auto counter = QSharedPointer<int>::create(0); |
167 | return KAsync::doWhile( | 167 | return KAsync::doWhile( |
168 | [this, counter]() { | 168 | [this, counter]() { |
169 | SinkTrace() << "Loop"; | ||
170 | return connectToServer(resourceInstanceIdentifier) | 169 | return connectToServer(resourceInstanceIdentifier) |
171 | .then<KAsync::ControlFlowFlag, QSharedPointer<QLocalSocket>>( | 170 | .then<KAsync::ControlFlowFlag, QSharedPointer<QLocalSocket>>( |
172 | [this, counter](const KAsync::Error &error, const QSharedPointer<QLocalSocket> &s) { | 171 | [this, counter](const KAsync::Error &error, const QSharedPointer<QLocalSocket> &s) { |
173 | if (error) { | 172 | if (error) { |
174 | static int waitTime = 10; | 173 | static int waitTime = 10; |
175 | static int timeout = 500; | 174 | static int timeout = 20000; |
176 | static int maxRetries = timeout / waitTime; | 175 | static int maxRetries = timeout / waitTime; |
177 | if (*counter > maxRetries) { | 176 | if (*counter > maxRetries) { |
178 | SinkTrace() << "Giving up"; | 177 | SinkTrace() << "Giving up"; |
@@ -213,8 +212,8 @@ KAsync::Job<void> ResourceAccess::Private::initializeSocket() | |||
213 | if (QProcess::startDetached("sink_synchronizer", args, QDir::homePath(), &pid)) { | 212 | if (QProcess::startDetached("sink_synchronizer", args, QDir::homePath(), &pid)) { |
214 | SinkTrace() << "Started resource " << pid; | 213 | SinkTrace() << "Started resource " << pid; |
215 | return tryToConnect() | 214 | return tryToConnect() |
216 | .onError([this](const KAsync::Error &error) { | 215 | .onError([this, args](const KAsync::Error &error) { |
217 | SinkWarning() << "Failed to connect to started resource"; | 216 | SinkWarning() << "Failed to connect to started resource: sink_synchronizer " << args; |
218 | }); | 217 | }); |
219 | } else { | 218 | } else { |
220 | SinkWarning() << "Failed to start resource"; | 219 | SinkWarning() << "Failed to start resource"; |