0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::net: Modernize remaining unencapsulated socket endpoint queries.

This commit is contained in:
Jason Volk 2023-02-07 19:33:26 -08:00
parent 81f38c24eb
commit 61348312a8
2 changed files with 7 additions and 7 deletions

View file

@ -632,13 +632,10 @@ ircd::handle_ec_default(client &client,
//
ircd::client::client(std::shared_ptr<socket> sock)
:instance_multimap{[&sock]
() -> net::ipport
:instance_multimap
{
assert(bool(sock));
const auto &ep(sock->remote());
return { ep.address(), ep.port() };
}()}
net::remote_ipport(*sock)
}
,head_buffer
{
conf->header_max_size

View file

@ -1439,12 +1439,15 @@ noexcept try
net::dock.notify_all();
if(unlikely(opened(*this)))
{
char buf[128];
throw panic
{
"Failed to ensure socket(%p) is disconnected from %s before dtor.",
this,
string(remote())
string(buf, remote_ipport(*this)),
};
}
}
catch(const std::exception &e)
{