mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +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;
|
steady_timer timer;
|
||||||
stat in, out;
|
stat in, out;
|
||||||
bool timedout {false};
|
bool timedout {false};
|
||||||
|
bool fini {false};
|
||||||
|
|
||||||
void call_user(const eptr_handler &, const error_code &) noexcept;
|
void call_user(const eptr_handler &, const error_code &) noexcept;
|
||||||
void call_user(const ec_handler &, const error_code &) noexcept;
|
void call_user(const ec_handler &, const error_code &) noexcept;
|
||||||
|
|
|
@ -1346,7 +1346,10 @@ try
|
||||||
in.bytes,
|
in.bytes,
|
||||||
out.bytes);
|
out.bytes);
|
||||||
|
|
||||||
|
assert(!fini);
|
||||||
|
fini = true;
|
||||||
cancel();
|
cancel();
|
||||||
|
|
||||||
if(opts.sopts)
|
if(opts.sopts)
|
||||||
set(*this, *opts.sopts);
|
set(*this, *opts.sopts);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue