From 14ba66fb8b486922d94f4a45aab0bfaaedec6c74 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 24 Nov 2023 00:09:36 +0300 Subject: [PATCH] Explicitly disable addProxy for watchOS and Emscripten. --- td/telegram/net/ConnectionCreator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/net/ConnectionCreator.cpp b/td/telegram/net/ConnectionCreator.cpp index 57eb829ec..0df061f2a 100644 --- a/td/telegram/net/ConnectionCreator.cpp +++ b/td/telegram/net/ConnectionCreator.cpp @@ -168,6 +168,10 @@ void ConnectionCreator::add_proxy(int32 old_proxy_id, string server, int32 port, G()->td_db()->get_binlog_pmc()->erase(get_proxy_used_database_key(old_proxy_id)); proxy_last_used_date_.erase(old_proxy_id); proxy_last_used_saved_date_.erase(old_proxy_id); + } else { +#if TD_EMSCRIPTEN || TD_DARWIN_WATCH_OS + return promise.set_error(Status::Error(400, "The method is unsupported for the platform")); +#endif } auto proxy_id = [&] {