connecthostport.c: code simplification

This commit is contained in:
Thomas Bernard 2019-03-10 19:23:58 +01:00
parent 4912dc37e3
commit b725f5114f
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 1 additions and 7 deletions

View File

@ -260,15 +260,9 @@ SOCKET connecthostport(const char * host, unsigned short port,
} }
} }
#endif /* #ifdef MINIUPNPC_IGNORE_EINTR */ #endif /* #ifdef MINIUPNPC_IGNORE_EINTR */
if(n < 0) if(n >= 0) /* connect() was successful */
{
continue;
}
else
{
break; break;
} }
}
freeaddrinfo(ai); freeaddrinfo(ai);
if(ISINVALID(s)) if(ISINVALID(s))
{ {