summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2022-07-01 16:20:34 -0400
committerGökay ŞATIR <gokaysatir@gmail.com>2022-08-05 15:58:08 +0300
commit36670ec7ed20de95362eff0d9730434b76c856e8 (patch)
tree55bf5b1e7e35994e904da995e56821cb765f3a9d
parentwsd: saving timeout set to 4x loading-time (diff)
downloadonline-36670ec7ed20de95362eff0d9730434b76c856e8.tar.gz
online-36670ec7ed20de95362eff0d9730434b76c856e8.zip
wsd: http: do not assert on net::connect returning nullptr
Apparently this is an issue for proxy.php. Change-Id: I18090f17f22fe3145e7fa2364992a34a7e722f1b Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
-rw-r--r--net/HttpRequest.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/HttpRequest.hpp b/net/HttpRequest.hpp
index 5a3bd2a7f8..b24440e791 100644
--- a/net/HttpRequest.hpp
+++ b/net/HttpRequest.hpp
@@ -1278,6 +1278,9 @@ private:
_socket.reset(); // Reset to make sure we are disconnected.
std::shared_ptr<StreamSocket> socket =
net::connect(_host, _port, isSecure(), shared_from_this());
+
+ // When used with proxy.php we may indeed get nullptr here.
+ // assert(socket && "Unexpected nullptr returned from net::connect");
_socket = socket; // Hold a weak pointer to it.
return socket; // Return the shared pointer.
}