don't fail socks5 on 'socket already open'
This commit is contained in:
@@ -80,12 +80,15 @@ namespace libtorrent
|
||||
}
|
||||
|
||||
error_code ec;
|
||||
m_sock.open(i->endpoint().protocol(), ec);
|
||||
if (ec)
|
||||
if (!m_sock.is_open())
|
||||
{
|
||||
(*h)(ec);
|
||||
close(ec);
|
||||
return;
|
||||
m_sock.open(i->endpoint().protocol(), ec);
|
||||
if (ec)
|
||||
{
|
||||
(*h)(ec);
|
||||
close(ec);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// TOOD: we could bind the socket here, since we know what the
|
||||
|
Reference in New Issue
Block a user