diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2011-04-06 14:10:34 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:43 (GMT) |
commit | d6ddf6e8c2ae9629c0b8d99e5215a91cd183cfe1 (patch) | |
tree | fc0647731998e9b9237a081fa612c169ef3eab83 /src | |
parent | 84c3b3e32612149d128d5288aebdf27badb8d43c (diff) | |
download | Qt-d6ddf6e8c2ae9629c0b8d99e5215a91cd183cfe1.zip Qt-d6ddf6e8c2ae9629c0b8d99e5215a91cd183cfe1.tar.gz Qt-d6ddf6e8c2ae9629c0b8d99e5215a91cd183cfe1.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.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index b5dcb05..c4fc4c7 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(); } |