0
0
Fork 0
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:
Jason Volk 2018-04-20 19:53:36 -07:00
parent ebea2e2385
commit 784293e01f

View file

@ -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;
}};