ignore failures in when asking for local_endpoint

This commit is contained in:
Arvid Norberg 2010-07-18 14:45:43 +00:00
parent eed5ec97a6
commit a3f5962f91
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ namespace libtorrent
bool is_closed() const { return m_abort; }
tcp::endpoint local_endpoint() const
{
udp::endpoint ep = m_ipv4_sock.local_endpoint();
error_code ec;
udp::endpoint ep = m_ipv4_sock.local_endpoint(ec);
return tcp::endpoint(ep.address(), ep.port());
}