Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeander Beernaert <lbb-dev@pm.me>2020-04-09 13:27:54 +0300
committerLeander Beernaert <lbb-dev@pm.me>2020-04-09 13:27:54 +0300
commit010376518fd635f02b97f722e680bef285f2b595 (patch)
tree08dafdce39497e4c1134007dd6248a0a08db4cfd
parent4201ebb28deb5042d84cd39dab9cba27e05ce56b (diff)
Fix incorrect handling of ipv4 case
-rw-r--r--common/TracySocket.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/TracySocket.cpp b/common/TracySocket.cpp
index a2461198..a530102b 100644
--- a/common/TracySocket.cpp
+++ b/common/TracySocket.cpp
@@ -317,9 +317,11 @@ bool ListenSocket::Listen( int port, int backlog )
// with the IPV4 protocol
hints.ai_family = AF_INET;
if( getaddrinfo( nullptr, portbuf, &hints, &res ) != 0 ) return false;
- }
- m_sock = socket( res->ai_family, res->ai_socktype, res->ai_protocol );
- if (m_sock == -1) {
+ m_sock = socket( res->ai_family, res->ai_socktype, res->ai_protocol );
+ if (m_sock == -1) {
+ return false;
+ }
+ } else {
return false;
}
#if defined _WIN32 || defined __CYGWIN__