diff options
author | Michael Brasser <mbrasser@ford.com> | 2017-01-27 10:28:48 -0600 |
---|---|---|
committer | Michael Brasser <michael.brasser@live.com> | 2017-02-02 18:24:10 +0000 |
commit | be567012c9cf16b7de4b0eadd34f1c80237e62c2 (patch) | |
tree | fa95895168c289acd4d696dc086f668bbefce3e2 | |
parent | 3d3888c2ea4eea637a4e7fad754b2f5d3afc4170 (diff) |
Don't treat re-request of connection as error
This is an okay state, not an error.
Change-Id: I9e098ec50b8990d187770f6c17ba6546ff37e448
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
-rw-r--r-- | src/remoteobjects/qremoteobjectnode.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/remoteobjects/qremoteobjectnode.cpp b/src/remoteobjects/qremoteobjectnode.cpp index a1ab716..ffd8fcb 100644 --- a/src/remoteobjects/qremoteobjectnode.cpp +++ b/src/remoteobjects/qremoteobjectnode.cpp @@ -278,9 +278,7 @@ void QRemoteObjectNodePrivate::openConnectionIfNeeded(const QString &name) return; } - if (initConnection(remoteObjectAddresses()[name].hostUrl)) - qROPrivDebug() << "openedConnection" << remoteObjectAddresses()[name]; - else + if (!initConnection(remoteObjectAddresses()[name].hostUrl)) qROPrivWarning() << "failed to open connection to" << name; } @@ -288,8 +286,8 @@ bool QRemoteObjectNodePrivate::initConnection(const QUrl &address) { Q_Q(QRemoteObjectNode); if (requestedUrls.contains(address)) { - qROPrivWarning() << "Connection already initialized for " << address.toString(); - return false; + qROPrivDebug() << "Connection already requested for " << address.toString(); + return true; } requestedUrls.insert(address); @@ -300,6 +298,7 @@ bool QRemoteObjectNodePrivate::initConnection(const QUrl &address) return false; } + qROPrivDebug() << "Opening connection to" << address.toString(); qROPrivDebug() << "Replica Connection isValid" << connection->isOpen(); QObject::connect(connection, SIGNAL(shouldReconnect(ClientIoDevice*)), q, SLOT(onShouldReconnect(ClientIoDevice*))); connection->connectToServer(); |