Fix file transfers

This commit is contained in:
Aleix Pol 2016-06-03 16:38:04 +02:00
parent 8736d2559e
commit 252ea4ba20

View file

@ -58,9 +58,8 @@ void DownloadJob::start()
connect(mSocket.data(), SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(done()));
//connect(mSocket.data(), &QAbstractSocket::connected, [=](){ qDebug() << "Connected"; });
// Cannot use read only, might be due to ssl handshake, getting QIODevice::ReadOnly error and no connection
mSocket->connectToHostEncrypted(mAddress.toString(), mPort, QIODevice::ReadWrite);
mSocket->waitForEncrypted();
mSocket->connectToHost(mAddress.toString(), mPort);
mSocket->waitForConnected();
// mSocket->connectToHost(mAddress, mPort, QIODevice::ReadOnly);
// mSocket->waitForConnected();