summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qabstractsocket.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-09-11 22:22:46 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-09-11 22:22:47 +0200
commit8ed2fcd366caf310e99db982f222bc6ec750c0a7 (patch)
treec51cae57da4a87d677145e44ba57765a1e5a3874 /src/network/socket/qabstractsocket.cpp
parent6918c0a15ba049d7e0de2302846dfadce4866861 (diff)
parentc12b5e07274acde364be98cd0de620d3a44c97b7 (diff)
Merge 5.5 into 5.5.1
Diffstat (limited to 'src/network/socket/qabstractsocket.cpp')
-rw-r--r--src/network/socket/qabstractsocket.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index c42b4f520c..d93150799c 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -739,15 +739,9 @@ bool QAbstractSocketPrivate::canReadNotification()
return true;
}
- if (socketEngine) {
- // turn the socket engine off if we've either:
- // - got pending datagrams
- // - reached the buffer size limit
- if (isBuffered)
- socketEngine->setReadNotificationEnabled(readBufferMaxSize == 0 || readBufferMaxSize > q->bytesAvailable());
- else if (socketType != QAbstractSocket::TcpSocket)
- socketEngine->setReadNotificationEnabled(!socketEngine->hasPendingDatagrams());
- }
+ // turn the socket engine off if we've reached the buffer size limit
+ if (socketEngine && isBuffered)
+ socketEngine->setReadNotificationEnabled(readBufferMaxSize == 0 || readBufferMaxSize > q->bytesAvailable());
// reset the read socket notifier state if we reentered inside the
// readyRead() connected slot.