aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdnet/td/net/Wget.cpp
diff options
context:
space:
mode:
authorArseny Smirnov <arseny30@gmail.com>2021-03-27 11:02:32 +0300
committerArseny Smirnov <arseny30@gmail.com>2021-03-29 16:26:11 +0300
commita51b63afddf45648c681359770c84ee77f4bfe5e (patch)
treed4541bce123edec406eea2095b02b54e8a784986 /tdnet/td/net/Wget.cpp
parent079c9919d2f892db81d328abec57f54464d4a78d (diff)
more checks for watch os version
Diffstat (limited to 'tdnet/td/net/Wget.cpp')
-rw-r--r--tdnet/td/net/Wget.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tdnet/td/net/Wget.cpp b/tdnet/td/net/Wget.cpp
index a6723ec43..7f961e3a6 100644
--- a/tdnet/td/net/Wget.cpp
+++ b/tdnet/td/net/Wget.cpp
@@ -74,6 +74,9 @@ Status Wget::try_init() {
TRY_STATUS(addr.init_host_port(url.host_, url.port_, prefer_ipv6_));
TRY_RESULT(fd, SocketFd::open(addr));
+ if (fd.empty()) {
+ return td::Status::Error("Sockets are not supported");
+ }
if (url.protocol_ == HttpUrl::Protocol::Http) {
connection_ = create_actor<HttpOutboundConnection>("Connect", std::move(fd), SslStream{},
std::numeric_limits<std::size_t>::max(), 0, 0,