summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine.cpp
diff options
context:
space:
mode:
authorMartin Petersson <martin.petersson@nokia.com>2012-07-11 12:31:29 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-01 18:12:34 +0200
commitb8453b6fe3552cdfe32c726f87bb30d897c679b0 (patch)
tree544227e592bda31eaf8ba266f33f7cadb6336a45 /src/network/socket/qnativesocketengine.cpp
parente178b49522465becf1b0c56bff1974e6037ba9ec (diff)
QtNetwork: Handle FD_CLOSE on Windows
We need to handle FD_CLOSE separately on Windows as this will be sent only once. When we get FD_CLOSE we need to check if there is more data available for reading. It there is this might indicate that there is another FD_READ that we need to handle after the FD_CLOSE. So in this case we will manually create another close event. Task-number: QTBUG-19409 Task-number: QTBUG-25386 Change-Id: Ie19906bc3f64fb6a85a508a5ab12caac5d70ccdb Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/network/socket/qnativesocketengine.cpp')
-rw-r--r--src/network/socket/qnativesocketengine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp
index f2e2f692ac..3dca7aa9ee 100644
--- a/src/network/socket/qnativesocketengine.cpp
+++ b/src/network/socket/qnativesocketengine.cpp
@@ -1142,6 +1142,9 @@ bool QReadNotifier::event(QEvent *e)
if (e->type() == QEvent::SockAct) {
engine->readNotification();
return true;
+ } else if (e->type() == QEvent::SockClose) {
+ engine->closeNotification();
+ return true;
}
return QSocketNotifier::event(e);
}