Socket::UDPConnection now uses its currently bound socket type for destinations

This commit is contained in:
Thulinma 2020-05-25 23:28:47 +02:00
parent b9c03ccb18
commit 540694df1f
2 changed files with 3 additions and 1 deletions

View file

@ -1685,7 +1685,7 @@ void Socket::UDPConnection::SetDestination(std::string destIp, uint32_t port){
ss << port;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
hints.ai_family = family;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
hints.ai_protocol = IPPROTO_UDP;