From 70bee089d492437ce931aa78446d89af3da182fc Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 10 Mar 2023 13:22:18 +0300 Subject: [PATCH] Fix watchOS building. --- td/mtproto/RawConnection.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/td/mtproto/RawConnection.cpp b/td/mtproto/RawConnection.cpp index 13f8e0754..1364ceb6d 100644 --- a/td/mtproto/RawConnection.cpp +++ b/td/mtproto/RawConnection.cpp @@ -375,6 +375,17 @@ class RawConnectionHttp final : public RawConnection { std::shared_ptr>> answers_; std::vector to_send_; + void on_read(size_t size, Callback &callback) { + if (size <= 0) { + return; + } + + if (stats_callback_) { + stats_callback_->on_read(size); + } + callback.on_read(size); + } + void send_packet(BufferSlice packet) { CHECK(mode_ == Send); mode_ = Receive;