mirror of
https://github.com/matrix-construct/construct
synced 2024-11-04 21:08:57 +01:00
ircd::server: Add a canceled tag reaper.
This commit is contained in:
parent
5ead261243
commit
844bf46a5c
2 changed files with 20 additions and 0 deletions
|
@ -94,6 +94,7 @@ struct ircd::server::link
|
||||||
void cancel_uncommitted(std::exception_ptr);
|
void cancel_uncommitted(std::exception_ptr);
|
||||||
void cancel_committed(std::exception_ptr);
|
void cancel_committed(std::exception_ptr);
|
||||||
void cancel_all(std::exception_ptr);
|
void cancel_all(std::exception_ptr);
|
||||||
|
void cleanup_canceled();
|
||||||
void submit(request &);
|
void submit(request &);
|
||||||
|
|
||||||
// control panel
|
// control panel
|
||||||
|
|
|
@ -1737,10 +1737,29 @@ ircd::server::link::submit(request &request)
|
||||||
tag_count()
|
tag_count()
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
cleanup_canceled();
|
||||||
|
|
||||||
if(ready())
|
if(ready())
|
||||||
wait_writable();
|
wait_writable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::server::link::cleanup_canceled()
|
||||||
|
{
|
||||||
|
auto it(begin(queue));
|
||||||
|
while(it != end(queue))
|
||||||
|
{
|
||||||
|
auto &tag{*it};
|
||||||
|
if(tag.committed() || tag.request)
|
||||||
|
{
|
||||||
|
++it;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
it = queue.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::server::link::cancel_all(std::exception_ptr eptr)
|
ircd::server::link::cancel_all(std::exception_ptr eptr)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue