mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01:00
ircd::server: Compute the cancellation size before any disassociations.
This commit is contained in:
parent
71fa1c068b
commit
0307fe629e
1 changed files with 5 additions and 5 deletions
|
@ -2548,6 +2548,11 @@ noexcept
|
|||
assert(tag.request == &request);
|
||||
assert(!tag.cancellation);
|
||||
|
||||
const size_t cancellation_size
|
||||
{
|
||||
size(request.out) + size(request.in)
|
||||
};
|
||||
|
||||
// Disassociate the user's request and add our dummy request in its place.
|
||||
disassociate(request, tag);
|
||||
|
||||
|
@ -2558,11 +2563,6 @@ noexcept
|
|||
// Setup the cancellation buffers by mirroring the current state of the
|
||||
// user's buffers.
|
||||
|
||||
const size_t cancellation_size
|
||||
{
|
||||
size(request.out) + size(request.in)
|
||||
};
|
||||
|
||||
assert(!tag.cancellation);
|
||||
tag.cancellation = std::make_unique<char[]>(cancellation_size);
|
||||
char *ptr{tag.cancellation.get()};
|
||||
|
|
Loading…
Add table
Reference in a new issue