summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Petersson <martin.petersson@nokia.com>2011-04-06 14:10:34 (GMT)
committerMartin Petersson <martin.petersson@nokia.com>2011-04-06 14:14:37 (GMT)
commit258c1a8537816f7b4c79e7cf4090a333768a10fa (patch)
treef38748731889fd527c42561a3694b8360b571872 /src
parent0a4f6af142c57929bd743f3e95e25ada8642e9e4 (diff)
downloadQt-258c1a8537816f7b4c79e7cf4090a333768a10fa.zip
Qt-258c1a8537816f7b4c79e7cf4090a333768a10fa.tar.gz
Qt-258c1a8537816f7b4c79e7cf4090a333768a10fa.tar.bz2
QLocalSocket: fix abort on Windows.
The socket will not close as long as there are bytes left to write. So by deleting the pipeWriter bytesToTrite will be 0 and the socket will close directly. Task-number: QTBUG-14939 Reviewed-by: Joerg Bornemann
Diffstat (limited to 'src')
-rw-r--r--src/network/socket/qlocalsocket_win.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 7bbe275..9d21fde 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -348,6 +348,11 @@ qint64 QLocalSocket::writeData(const char *data, qint64 maxSize)
void QLocalSocket::abort()
{
+ Q_D(QLocalSocket);
+ if (d->pipeWriter) {
+ delete d->pipeWriter;
+ d->pipeWriter = 0;
+ }
close();
}