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

ircd::net: Use nothrowing remote() for socket; cleanup handler.

This commit is contained in:
Jason Volk 2017-11-16 22:03:20 -08:00
parent 6b961711cb
commit 69f05391a6

View file

@ -1019,7 +1019,7 @@ try
if(sd.is_open()) if(sd.is_open())
log.debug("socket(%p): disconnect: %s type: %d", log.debug("socket(%p): disconnect: %s type: %d",
(const void *)this, (const void *)this,
string(remote()), string(remote_ipport(*this)),
uint(type)); uint(type));
if(sd.is_open()) switch(type) if(sd.is_open()) switch(type)
@ -1092,16 +1092,16 @@ catch(const boost::system::system_error &e)
uint(type), uint(type),
e.what()); e.what());
if(!sd.is_open()) if(sd.is_open())
throw; {
boost::system::error_code ec; boost::system::error_code ec;
sd.close(ec); sd.close(ec);
if(ec) if(ec)
log.warning("socket(%p): after disconnect: %s: %s", log.warning("socket(%p): after disconnect: %s: %s",
this, this,
string(ec)); string(ec));
}
throw; throw;
} }