mirror of
https://github.com/anope/anope.git
synced 2026-06-25 15:46:37 +02:00
Fixed resolving hosts on connect
This commit is contained in:
+2
-1
@@ -319,7 +319,8 @@ void SocketIO::Bind(Socket *s, const Anope::string &ip, int port)
|
||||
*/
|
||||
void SocketIO::Connect(ConnectionSocket *s, const Anope::string &target, int port)
|
||||
{
|
||||
s->conaddr.pton(s->IsIPv6() ? AF_INET6 : AF_INET, target, port);
|
||||
DNSRecord req = DNSManager::BlockingQuery(target, s->IsIPv6() ? DNS_QUERY_AAAA : DNS_QUERY_A);
|
||||
s->conaddr.pton(s->IsIPv6() ? AF_INET6 : AF_INET, req.result, port);
|
||||
int c = connect(s->GetFD(), &s->conaddr.sa, s->conaddr.size());
|
||||
if (c == -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user