diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2016-03-19 14:34:21 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-03-21 17:53:18 +0000 |
commit | 13abbea788cec1b95524a15c5e617e2e9d4bbaba (patch) | |
tree | a10067fccb16f4642a25ae163afb39e5eedcf347 /src/plugins | |
parent | 765eab51036040d0659bc96bfdc1bbf991877862 (diff) |
Rework toggling the state of read notifier on buffered socket
Read notifications on a buffered socket are enabled all the time while
the socket is connected unless the buffer size limit is reached. To
enable the read notifier again, the user needs to read the data or
enlarge the buffer with a setReadBufferSize() call.
According to that scenario, it's very likely that the socket will
toggle the state of notifier twice (on->off->on) in one notification
cycle. Also, use of the readyRead() signal with a queued connection
leads to the same problem.
This patch prevents this unnecessary toggling by:
- unconditionally setting the notifier's state in setReadBufferSize();
- deferring the notification disabling in canReadNotification()
to the next notification cycle.
Change-Id: I29df32f12c9c80a325373af86963e924817f2167
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/plugins')
0 files changed, 0 insertions, 0 deletions