mirror of https://github.com/oxen-io/lokinet
Fix sockaddr_len initial value
This commit is contained in:
parent
b856b78de3
commit
d4739d5d47
|
@ -263,7 +263,7 @@ namespace llarp::dns
|
|||
}
|
||||
struct sockaddr_storage sas;
|
||||
auto* sa = reinterpret_cast<struct sockaddr*>(&sas);
|
||||
socklen_t sa_len;
|
||||
socklen_t sa_len = sizeof(sas);
|
||||
if (0 != getsockname(fd, sa, &sa_len))
|
||||
{
|
||||
close(fd);
|
||||
|
|
Loading…
Reference in New Issue