diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2016-11-30 15:32:02 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-12-06 07:59:39 +0000 |
commit | 14ea8759da0d5eb1888664a5b0d08c2bf142a6a2 (patch) | |
tree | c09adf6141fba1273d58fb4d2d07e1182a64544e /tests | |
parent | 6ae9dc3f379728a1aaee818a169c03954d6a445c (diff) |
winrt: Change the way tcp packets are handled
Similar to the way datagrams are handled for udp sockets the worker now
takes care of tcp data. Thus we avoid race conditions which stopped data
processing. It could happen that data was read from the socket into the
buffer and before readyRead was emitted the buffer was completely read.
In this case readNotification is set to false and no new data is processed
afterwards.
Additionally the buffer was replaced by a vector of QByteArray. The buffer
kept growing and was never cleared (and there is no obvious way for
clearing the buffer), so that an overflow happened eventually.
pendingReadOperations (and its mutex) could be removed as well. There is
only one situation where they could clash and that's the initial read.
Having two members is preferred over having a list of operations and a
mutex.
Task-number: QTBUG-56438
Change-Id: Idbad58e47785996023748c310530892163f24594
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions