mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::net: Add socket state and assertion for fini.
This commit is contained in:
parent
e59c04e2a5
commit
49d6d2b8ea
2 changed files with 4 additions and 0 deletions
|
@ -49,6 +49,7 @@ struct ircd::net::socket
|
|||
steady_timer timer;
|
||||
stat in, out;
|
||||
bool timedout {false};
|
||||
bool fini {false};
|
||||
|
||||
void call_user(const eptr_handler &, const error_code &) noexcept;
|
||||
void call_user(const ec_handler &, const error_code &) noexcept;
|
||||
|
|
|
@ -1346,7 +1346,10 @@ try
|
|||
in.bytes,
|
||||
out.bytes);
|
||||
|
||||
assert(!fini);
|
||||
fini = true;
|
||||
cancel();
|
||||
|
||||
if(opts.sopts)
|
||||
set(*this, *opts.sopts);
|
||||
|
||||
|
|
Loading…
Reference in a new issue