Explorar o código

Merge pull request #29546 from hpvb/fix-random-ssl-crash

Fix random ssl crash
Rémi Verschelde %!s(int64=6) %!d(string=hai) anos
pai
achega
629bc10d80
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      core/io/http_client.cpp

+ 6 - 0
core/io/http_client.cpp

@@ -346,6 +346,12 @@ Error HTTPClient::poll() {
 						} else {
 							// We are already handshaking, which means we can use your already active SSL connection
 							ssl = static_cast<Ref<StreamPeerSSL> >(connection);
+							if (ssl.is_null()) {
+								close();
+								status = STATUS_SSL_HANDSHAKE_ERROR;
+								return ERR_CANT_CONNECT;
+							}
+
 							ssl->poll(); // Try to finish the handshake
 						}