mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd::client: Assertions for request context.
This commit is contained in:
parent
ebea2e2385
commit
784293e01f
1 changed files with 3 additions and 0 deletions
|
@ -388,10 +388,13 @@ noexcept try
|
|||
{
|
||||
// The ircd::ctx now handling this request is referenced and accessible
|
||||
// in client for the duration of this handling.
|
||||
assert(ctx::current);
|
||||
assert(!client->reqctx);
|
||||
client->reqctx = ctx::current;
|
||||
const unwind reset{[&client]
|
||||
{
|
||||
assert(bool(client));
|
||||
assert(client->reqctx);
|
||||
client->reqctx = nullptr;
|
||||
}};
|
||||
|
||||
|
|
Loading…
Reference in a new issue