From 64626f682e41168a2973c5f23f35f5518c211864 Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam-Stewart Date: Thu, 6 Jun 2019 13:46:54 +0000 Subject: Fix a random SSL crash I saw once. I don't know why this happened, I was debugging another issue. This should take care of it though. --- core/io/http_client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core') diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index ce2054db36..891fb7b0ca 100644 --- a/core/io/http_client.cpp +++ b/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 >(connection); + if (ssl.is_null()) { + close(); + status = STATUS_SSL_HANDSHAKE_ERROR; + return ERR_CANT_CONNECT; + } + ssl->poll(); // Try to finish the handshake } -- cgit v1.2.3