mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 18:18:56 +02:00
ircd::resource: Reset the client.request object after request.
This commit is contained in:
parent
1143789f35
commit
414133ba55
|
@ -262,6 +262,16 @@ ircd::resource::operator()(client &client,
|
|||
};
|
||||
}
|
||||
|
||||
// We take the extra step here to clear the assignment to client.request
|
||||
// when this request stack has finished for two reasons:
|
||||
// - It allows other ctxs to peep at the client::list to see what this
|
||||
// client/ctx/request is currently working on with some more safety.
|
||||
// - It prevents an easy source for stale refs wrt the longpoll thing.
|
||||
const unwind clear_request{[&client]
|
||||
{
|
||||
client.request = {};
|
||||
}};
|
||||
|
||||
client.request = resource::request
|
||||
{
|
||||
head, content
|
||||
|
|
Loading…
Reference in a new issue