From 244986ae7dbe3442386e958c319f701a0b809e06 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 8 Nov 2021 19:07:55 +0300 Subject: [PATCH] Crash if tryibg to create a NetActor while closing. --- td/telegram/Td.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/td/telegram/Td.h b/td/telegram/Td.h index e94a1cb1a..36e69c0ba 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -126,6 +126,11 @@ class Td final : public Actor { template ActorId create_net_actor(ArgsT &&... args) { + LOG_CHECK(close_flag_ < 1) << close_flag_ +#if TD_CLANG || TD_GCC + << ' ' << __PRETTY_FUNCTION__ +#endif + ; auto slot_id = request_actors_.create(ActorOwn<>(), RequestActorIdType); inc_request_actor_refcnt(); auto actor = make_unique(std::forward(args)...);