fixed typo and possible (but unlikely) crash in the tcp-resolver

This commit is contained in:
Emiel Bruijntjes 2018-10-28 18:52:41 +01:00
parent 62a4262a58
commit 3f32e8773d
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ private:
_socket = socket(addresses[i]->ai_family, addresses[i]->ai_socktype, addresses[i]->ai_protocol);
// move on on failure
if (_socket < -1) continue;
if (_socket < 0) continue;
// connect to the socket
if (connect(_socket, addresses[i]->ai_addr, addresses[i]->ai_addrlen) == 0) break;