diff --git a/matrix/typing.cc b/matrix/typing.cc index dba45fdf3..1129b42bb 100644 --- a/matrix/typing.cc +++ b/matrix/typing.cc @@ -321,14 +321,21 @@ ircd::m::typing::for_each(const closure &closure) static void timeout_timeout(const typist &); static bool timeout_check(); static void timeout_worker(); -context timeout_context +static context timeout_context { "typing", 256_KiB, - context::POST, + context::POST | context::WAIT_JOIN, timeout_worker }; +static void +__attribute__((destructor)) +timeout_terminate() +{ + timeout_context.terminate(); +} + void __attribute__((noreturn)) timeout_worker()