summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkrequest.cpp
diff options
context:
space:
mode:
authorAndreas Hartmetz <andreas@ixgreen.de>2025-11-23 11:30:55 +0100
committerAndreas Hartmetz <andreas@ixgreen.de>2025-12-03 19:47:31 +0100
commitd149bd146c2551561bce4fe20e5c1d4f976a6ef6 (patch)
tree1dc618177b76e4f788d4ed28ec06818c6fca15d1 /src/network/access/qnetworkrequest.cpp
parent25e79d1526bae615f84a3976733fd0fdf71bd67d (diff)
Fix waitForBytesWritten() -> readyRead() -> write from user code
waitForBytesWritten() can emit signals, most importantly readyRead(), *before* even writing data. Anything can happen in slots connected to these signals - which includes writing out some data, which can make a subsequent attempt to write data in waitForBytesWritten() fail(*), so waitForBytesWritten() fails. Recognize when anything invoked from the current call wrote out some data and return success instead. It is not possible to deal correctly with all shenanigans in signal handlers, but this seems quite reasonable. Also fix QAbstractSocket build with QABSTRACTSOCKET_DEBUG defined. (*) for at least two reasons: nothing to write anymore or OS write buffer full Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ibf4de93d5e7dc2f88b675de410b216674faa20ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
0 files changed, 0 insertions, 0 deletions