Don't inherit Td from NetQueryCallback.
This commit is contained in:
parent
088c3169d4
commit
78baa7977b
@ -3337,7 +3337,6 @@ void Td::invalidate_handler(ResultHandler *handler) {
|
|||||||
void Td::send(NetQueryPtr &&query) {
|
void Td::send(NetQueryPtr &&query) {
|
||||||
VLOG(net_query) << "Send " << query << " to dispatcher";
|
VLOG(net_query) << "Send " << query << " to dispatcher";
|
||||||
query->debug("Td: send to NetQueryDispatcher");
|
query->debug("Td: send to NetQueryDispatcher");
|
||||||
query->set_callback(actor_shared(this, 1));
|
|
||||||
G()->net_query_dispatcher().dispatch(std::move(query));
|
G()->net_query_dispatcher().dispatch(std::move(query));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3566,7 +3565,7 @@ void Td::hangup_shared() {
|
|||||||
auto type = Container<int>::type_from_id(token);
|
auto type = Container<int>::type_from_id(token);
|
||||||
|
|
||||||
if (type == RequestActorIdType) {
|
if (type == RequestActorIdType) {
|
||||||
request_actors_.erase(get_link_token());
|
request_actors_.erase(token);
|
||||||
dec_request_actor_refcnt();
|
dec_request_actor_refcnt();
|
||||||
} else if (type == ActorIdType) {
|
} else if (type == ActorIdType) {
|
||||||
dec_actor_refcnt();
|
dec_actor_refcnt();
|
||||||
|
@ -89,7 +89,7 @@ extern int VERBOSITY_NAME(td_requests);
|
|||||||
//
|
//
|
||||||
// Parent needs a way to know that it will receive no more updates.
|
// Parent needs a way to know that it will receive no more updates.
|
||||||
// It happens after destruction of callback or after on_closed.
|
// It happens after destruction of callback or after on_closed.
|
||||||
class Td final : public NetQueryCallback {
|
class Td final : public Actor {
|
||||||
public:
|
public:
|
||||||
Td(const Td &) = delete;
|
Td(const Td &) = delete;
|
||||||
Td(Td &&) = delete;
|
Td(Td &&) = delete;
|
||||||
@ -113,7 +113,7 @@ class Td final : public NetQueryCallback {
|
|||||||
|
|
||||||
void on_update(BufferSlice &&update);
|
void on_update(BufferSlice &&update);
|
||||||
|
|
||||||
void on_result(NetQueryPtr query) final;
|
void on_result(NetQueryPtr query);
|
||||||
|
|
||||||
void on_update_server_time_difference();
|
void on_update_server_time_difference();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user