mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Fix incorrect handling of ipv4 case
This commit is contained in:
parent
4201ebb28d
commit
010376518f
@ -317,9 +317,11 @@ bool ListenSocket::Listen( int port, int backlog )
|
|||||||
// with the IPV4 protocol
|
// with the IPV4 protocol
|
||||||
hints.ai_family = AF_INET;
|
hints.ai_family = AF_INET;
|
||||||
if( getaddrinfo( nullptr, portbuf, &hints, &res ) != 0 ) return false;
|
if( getaddrinfo( nullptr, portbuf, &hints, &res ) != 0 ) return false;
|
||||||
}
|
m_sock = socket( res->ai_family, res->ai_socktype, res->ai_protocol );
|
||||||
m_sock = socket( res->ai_family, res->ai_socktype, res->ai_protocol );
|
if (m_sock == -1) {
|
||||||
if (m_sock == -1) {
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user