mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +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
20
ircd/net.cc
20
ircd/net.cc
|
@ -1019,7 +1019,7 @@ try
|
|||
if(sd.is_open())
|
||||
log.debug("socket(%p): disconnect: %s type: %d",
|
||||
(const void *)this,
|
||||
string(remote()),
|
||||
string(remote_ipport(*this)),
|
||||
uint(type));
|
||||
|
||||
if(sd.is_open()) switch(type)
|
||||
|
@ -1092,16 +1092,16 @@ catch(const boost::system::system_error &e)
|
|||
uint(type),
|
||||
e.what());
|
||||
|
||||
if(!sd.is_open())
|
||||
throw;
|
||||
if(sd.is_open())
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
sd.close(ec);
|
||||
if(ec)
|
||||
log.warning("socket(%p): after disconnect: %s: %s",
|
||||
this,
|
||||
string(ec));
|
||||
}
|
||||
|
||||
boost::system::error_code ec;
|
||||
sd.close(ec);
|
||||
|
||||
if(ec)
|
||||
log.warning("socket(%p): after disconnect: %s: %s",
|
||||
this,
|
||||
string(ec));
|
||||
throw;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue