QSocks5SocketEngine: Add missing return on error

Change-Id: I199b7156c280e02c3ce37bd72ba0dc1febf10fe9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2020-11-19 11:56:21 +01:00
parent 1911a4d40a
commit ffea715605

View File

@ -1637,6 +1637,10 @@ qint64 QSocks5SocketEngine::writeDatagram(const char *data, qint64 len, const QI
outBuf.reserve(270 + len);
outBuf.append(3, '\0');
if (!qt_socks5_set_host_address_and_port(header.destinationAddress, header.destinationPort, &outBuf)) {
QSOCKS5_DEBUG << "error setting address" << header.destinationAddress << " : "
<< header.destinationPort;
//### set error code ....
return -1;
}
outBuf += QByteArray(data, len);
QSOCKS5_DEBUG << "sending" << dump(outBuf);