summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLasse Holmstedt <lasse.holmstedt@nokia.com>2010-08-27 11:05:25 (GMT)
committerLasse Holmstedt <lasse.holmstedt@nokia.com>2010-08-27 11:07:46 (GMT)
commitbd521ed56f8e4be7117dc3534c6fded68f7a70c5 (patch)
treef37a771048ad9214b4d8474dd07e3f815241d044 /src
parent7f69818e7dcd5b029010e5f930abed519956a8ff (diff)
downloadQt-bd521ed56f8e4be7117dc3534c6fded68f7a70c5.zip
Qt-bd521ed56f8e4be7117dc3534c6fded68f7a70c5.tar.gz
Qt-bd521ed56f8e4be7117dc3534c6fded68f7a70c5.tar.bz2
QDeclarativeDebug: Destroy incoming connections if already connected
Without this, QML Inspector in Qt Creator gets no error message for failed connections, which can lead to confusion. Reviewed-by: ogoffart
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index dca2695..1bbfcf4 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -128,6 +128,8 @@ void QDeclarativeDebugServer::newConnection()
if (d->connection) {
qWarning("QDeclarativeDebugServer error: another client is already connected");
+ QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection();
+ delete faultyConnection;
return;
}