When server is unreachable, post() from QNetworkAccessManager(NAM) blocks thread's eventloop, it practically freezes the thread, even if the timout signal is triggered, the quit slot is not called, it is just appended to the queue (it is been debugged while using) and is called after NAM stoppes blocking it, which can be minute or two. SSL is checked and everything is correct, even the version of openssl library. If I use dynamically created NAM or timer, the behaviour is the same. Unknown error is printed no slot is triggered from reply signals. No Ssl error or the other. The problem is that the thread is not responsive to user inputs either like quiting the application which has to wait until the NAM stops blocking the eventloop. Quit slot of the thread of course tries to interrupt the eventLoopServer in the presented method, but the slot is called after the NAM stops blocking the thread's eventloop.
added based on comments
In main I create MyApplication in which constructor I create my own class LicenseController, when the thread starts the init procedure is called so the local event loop I use to wait for server response is created in given thread. The thread LicenseController lives in is not accessing any other slot while the NAM does not return finished, its blocking given thread for unknown reason. After NAM emits finished the quit slot is called. Quit is not even called by the setuped timer. It would be usefull to have built in timer in NAM, for such cases. Otherwise when user tries to cancel the eventloop by itself, it does not let him, but it waits one or two minutes.
QObject::connect(&mgr, SIGNAL(finished(QNetworkReply*)), eventLoopServer, SLOT(quit()));
//eventLoopServer is created in init procedure, which is called after the thread of this controller class has been started
QObject::connect(&timer, SIGNAL(timeout()), eventLoopServer, SLOT(quit()));
QNetworkRequest request( QUrl( QString("my url address") ) );//there is valid url (checked), not possible to share
QByteArray postData ;
QString headerData = "secret header";//changed to be able to publish
QSslConfiguration conf = request.sslConfiguration();
QNetworkReply *reply=mgr.post(request, postData);
QObject::connect(reply, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(processSSLError(QList<QSslError>)));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(processError(QNetworkReply::NetworkError)));
QObject::connect(reply, SIGNAL(finished()),eventLoopServer, SLOT(quit()));
QString strReply = (QString)reply->readAll();
qDebug()<<reply->errorString(); // prints "Unknown error"