Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.1
-
None
Description
Calling QRemoteObjectHost::setHostUrl(...) with a port that is already in use returns true which I consider a bug.
If m_server is created but listen fails warnings are emitted but success will be returned. The using call is only checking whether m_server could be created (not null), not that listen() succeeded.
QT Source Code:
QRemoteObjectSourceIo::QRemoteObjectSourceIo(const QUrl &address, QObject *parent) : QObject(parent) , m_server(QtROServerFactory::instance()->create(address, this)) { if (m_server && m_server->listen(address)) { qRODebug(this) << "QRemoteObjectSourceIo is Listening" << address; } else { qROWarning(this) << "Listen failed for URL:" << address; if (m_server) qROWarning(this) << m_server->serverError(); else qROWarning(this) << "Most likely an unrecognized scheme was used."; return; } connect(m_server.data(), &QConnectionAbstractServer::newConnection, this, &QRemoteObjectSourceIo::handleConnection); }