fixup! fix: Couldnt send to IPv6 address warnings (#4527) (#4537)

This commit is contained in:
Charles Kerr 2023-01-04 18:18:22 -06:00 committed by GitHub
parent fcff89a21a
commit 634b1e8fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ void tr_session::tr_udp_core::sendto(void const* buf, size_t buflen, struct sock
{
errno = EAFNOSUPPORT;
}
else if (auto const sock = to->sa_family == AF_INET ? udp4_socket_ : udp6_socket_; sock != TR_BAD_SOCKET)
else if (auto const sock = to->sa_family == AF_INET ? udp4_socket_ : udp6_socket_; sock == TR_BAD_SOCKET)
{
// don't warn on bad sockets; the system may not support IPv6
return;