0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 21:28:53 +02:00

ircd::net: Close socket before its dtor on accept except.

This commit is contained in:
Jason Volk 2018-03-12 15:56:30 -07:00
parent f7ecc4342b
commit 949a006950

View file

@ -947,6 +947,15 @@ noexcept try
return;
--accepting;
const unwind::exceptional drop{[&sock]
{
if(!bool(sock))
return;
error_code ec;
sock->sd.close(ec);
}};
assert(bool(sock));
log.debug("%s: socket(%p) accepted(%zu) %s %s",
std::string(*this),