diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-27 15:34:30 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-27 15:34:30 (GMT) |
commit | 6330964f99366f31de85eda50e51a965d347868b (patch) | |
tree | 44fec73ba97d73c1e4799c9269e45c0ce2d4f9e8 /src/network | |
parent | 2a0f0fdc016259dcc956599f41aa024ed06116b5 (diff) | |
parent | 3cdde3b112f0c69e497d72d195b9ccc44d0048ab (diff) | |
download | Qt-6330964f99366f31de85eda50e51a965d347868b.zip Qt-6330964f99366f31de85eda50e51a965d347868b.tar.gz Qt-6330964f99366f31de85eda50e51a965d347868b.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into windows-7-multitouch
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 8 | ||||
-rw-r--r-- | src/network/socket/qlocalserver_unix.cpp | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 980c0e0..5940fba 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -265,6 +265,11 @@ bool QHttpNetworkConnectionPrivate::ensureConnection(QAbstractSocket *socket) if (socket->state() != QAbstractSocket::ConnectedState) { // connect to the host if not already connected. int index = indexOf(socket); + // resend this request after we receive the disconnected signal + if (socket->state() == QAbstractSocket::ClosingState) { + channels[index].resendCurrent = true; + return false; + } channels[index].state = ConnectingState; channels[index].pendingEncrypt = encrypt; @@ -982,6 +987,9 @@ void QHttpNetworkConnectionPrivate::_q_disconnected() channels[i].state = ReadingState; if (channels[i].reply) receiveReply(socket, channels[i].reply); + } else if (channels[i].state == IdleState && channels[i].resendCurrent) { + // re-sending request because the socket was in ClosingState + QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); } channels[i].state = IdleState; } diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp index 065a9de..e7d2252 100644 --- a/src/network/socket/qlocalserver_unix.cpp +++ b/src/network/socket/qlocalserver_unix.cpp @@ -148,9 +148,11 @@ void QLocalServerPrivate::closeServer() QT_CLOSE(listenSocket); listenSocket = -1; - if (socketNotifier) + if (socketNotifier) { + socketNotifier->setEnabled(false); // Otherwise, closed socket is checked before deleter runs socketNotifier->deleteLater(); - socketNotifier = 0; + socketNotifier = 0; + } if (!fullServerName.isEmpty()) QFile::remove(fullServerName); |