QHttpNetworkConnectionChannel: don't close if we're already closing
In some scenarios with QNAM we call socket->close, leading to a flush, leading to an error, leading to another error emission... To work around this scenario we stop trying to close the socket if the network channel is already closing. Change-Id: Id15504f476484ce61f11ba83a5755ceb5f581f9b Fixes: QTBUG-76567 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>bb10
parent
44d9e9b096
commit
e211697962
|
|
@ -207,6 +207,9 @@ void QHttpNetworkConnectionChannel::init()
|
|||
|
||||
void QHttpNetworkConnectionChannel::close()
|
||||
{
|
||||
if (state == QHttpNetworkConnectionChannel::ClosingState)
|
||||
return;
|
||||
|
||||
if (!socket)
|
||||
state = QHttpNetworkConnectionChannel::IdleState;
|
||||
else if (socket->state() == QAbstractSocket::UnconnectedState)
|
||||
|
|
|
|||
Loading…
Reference in New Issue