summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qwindowspipewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qwindowspipewriter.cpp')
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp
index 8e3de2d620..75cb8a7ede 100644
--- a/src/corelib/io/qwindowspipewriter.cpp
+++ b/src/corelib/io/qwindowspipewriter.cpp
@@ -197,7 +197,15 @@ bool QWindowsPipeWriter::write(const QByteArray &ba)
overlapped, &writeFileCompleted)) {
writeSequenceStarted = false;
buffer.clear();
- qErrnoWarning("QWindowsPipeWriter::write failed.");
+
+ const DWORD errorCode = GetLastError();
+ switch (errorCode) {
+ case ERROR_NO_DATA: // "The pipe is being closed."
+ // The other end has closed the pipe. This can happen in QLocalSocket. Do not warn.
+ break;
+ default:
+ qErrnoWarning(errorCode, "QWindowsPipeWriter::write failed.");
+ }
return false;
}