mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::net: Assertion found case where (timedout && !ec) is valid:
This happens when handle_timeout is executed while handle_ready has already hit the asio queue. The sd.cancel() is too late to cause ec==operation_canceled.
This commit is contained in:
parent
b90d3a9447
commit
a5389dfd95
1 changed files with 3 additions and 5 deletions
|
@ -1532,12 +1532,10 @@ noexcept try
|
|||
// After life_guard is constructed it is safe to use *this in this frame.
|
||||
const life_guard<socket> s{wp};
|
||||
|
||||
if(timedout)
|
||||
{
|
||||
assert(ec == operation_canceled);
|
||||
if(!timedout)
|
||||
cancel_timeout();
|
||||
else
|
||||
ec = { timed_out, system_category() };
|
||||
}
|
||||
else cancel_timeout();
|
||||
|
||||
if(!ec && !sd.is_open())
|
||||
ec = { bad_file_descriptor, system_category() };
|
||||
|
|
Loading…
Reference in a new issue