workaround for potentially faced libssl bug 11574

This commit is contained in:
John
2023-05-30 11:00:08 +02:00
parent 172f856967
commit 207435650d
+1 -1
View File
@@ -209,7 +209,7 @@ SSLSocket* SSLSocket::connect(const string& host, const uint16_t& port, bool htt
}
long res = BIO_do_connect(bio);
time_t now = 0;
while (res <= 0 && BIO_should_retry(bio)) {
while (res <= 0 && (BIO_should_retry(bio) || now == 0)) { // always repeat on first failure
if ((now=time(nullptr)) > until) {
break;
}