From 5e0a45e932424c5ed661ae518ca21d2ab627db2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 21 Jun 2019 13:02:34 +0200 Subject: [PATCH] QSocks5SocketEngine: pass data to application when connected If we end up in the connected state then we should pass on any remaining data immediately instead of waiting until the next time we get a read notification. The other `case`s in the switch might be able to do something similar, but I don't want to introduce that logic now in case it breaks something else, the Connected branch is small and simple to deal with. Should severely reduce flakiness with socks proxy in CI under pressure. Task-number: QTBUG-76367 Change-Id: I0965d4c62a29a25ce6b8dd60862a464279aef0b4 Reviewed-by: Timur Pocheptsov Reviewed-by: Ryan Chu --- src/network/socket/qsocks5socketengine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp index 6791b85273..d2328f8536 100644 --- a/src/network/socket/qsocks5socketengine.cpp +++ b/src/network/socket/qsocks5socketengine.cpp @@ -1188,6 +1188,8 @@ void QSocks5SocketEnginePrivate::_q_controlSocketReadNotification() break; case RequestMethodSent: parseRequestMethodReply(); + if (socks5State == Connected && data->controlSocket->bytesAvailable()) + _q_controlSocketReadNotification(); break; case Connected: { QByteArray buf;