diff --git a/tdnet/td/net/HttpConnectionBase.cpp b/tdnet/td/net/HttpConnectionBase.cpp index 3a7e5f261..652def782 100644 --- a/tdnet/td/net/HttpConnectionBase.cpp +++ b/tdnet/td/net/HttpConnectionBase.cpp @@ -190,5 +190,13 @@ void HttpConnectionBase::loop() { } } +void HttpConnectionBase::on_start_migrate(int32 sched_id) { + Scheduler::unsubscribe(fd_.get_poll_info().get_pollable_fd_ref()); +} + +void HttpConnectionBase::on_finish_migrate() { + Scheduler::subscribe(fd_.get_poll_info().extract_pollable_fd(this)); +} + } // namespace detail } // namespace td diff --git a/tdnet/td/net/HttpConnectionBase.h b/tdnet/td/net/HttpConnectionBase.h index 868aeac53..2970b81b0 100644 --- a/tdnet/td/net/HttpConnectionBase.h +++ b/tdnet/td/net/HttpConnectionBase.h @@ -66,6 +66,9 @@ class HttpConnectionBase : public Actor { void timeout_expired() override; void loop() override; + void on_start_migrate(int32 sched_id) override; + void on_finish_migrate() override; + virtual void on_query(unique_ptr query) = 0; virtual void on_error(Status error) = 0; };