0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 17:04:03 +01:00

ircd::net: Add socket state and assertion for fini.

This commit is contained in:
Jason Volk 2018-03-09 15:55:15 -08:00
parent e59c04e2a5
commit 49d6d2b8ea
2 changed files with 4 additions and 0 deletions

View file

@ -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;

View file

@ -1346,7 +1346,10 @@ try
in.bytes,
out.bytes);
assert(!fini);
fini = true;
cancel();
if(opts.sopts)
set(*this, *opts.sopts);