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:
parent
6b961711cb
commit
69f05391a6
1 changed files with 10 additions and 10 deletions
10
ircd/net.cc
10
ircd/net.cc
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue