forked from qt-creator/qt-creator
IosTool: Don't restrict the number of pending connections
Apparently a failed connection counts as "pending" for a while before it is finally removed. The QML profiler aggressively tries to connect with different timeouts and multiple sockets, so quite often there is such a failed connection which then prevents new connections from getting established. We already enforce the limit of only one successful connection via the SingleRelayServer subclass. Change-Id: I441e2ed898d28f04359a9976d5b25569b8447f3f Task-number: QTCREATORBUG-17141 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -407,7 +407,6 @@ RelayServer::~RelayServer()
|
|||||||
bool RelayServer::startServer(int port, bool ipv6)
|
bool RelayServer::startServer(int port, bool ipv6)
|
||||||
{
|
{
|
||||||
QTC_CHECK(!m_server.isListening());
|
QTC_CHECK(!m_server.isListening());
|
||||||
m_server.setMaxPendingConnections(1);
|
|
||||||
connect(&m_server, &QTcpServer::newConnection, this, &RelayServer::handleNewRelayConnection);
|
connect(&m_server, &QTcpServer::newConnection, this, &RelayServer::handleNewRelayConnection);
|
||||||
quint16 portValue = static_cast<quint16>(port);
|
quint16 portValue = static_cast<quint16>(port);
|
||||||
if (port < 0 || port > 0xFFFF)
|
if (port < 0 || port > 0xFFFF)
|
||||||
|
Reference in New Issue
Block a user