Don't bother doing any connection testing if no ports were specified

This commit is contained in:
Cameron Gutman 2020-08-09 12:08:16 -07:00
parent b59007cdea
commit f2c1d03d8e

View File

@ -89,6 +89,11 @@ unsigned int LiTestClientConnectivity(const char* testServer, unsigned short ref
testPortFlags &= VALID_PORT_FLAG_MASK; testPortFlags &= VALID_PORT_FLAG_MASK;
failingPortFlags = testPortFlags; failingPortFlags = testPortFlags;
// If no ports were specified, just return 0
if (testPortFlags == 0) {
return 0;
}
// Initialize sockets array to -1 // Initialize sockets array to -1
memset(sockets, 0xFF, sizeof(sockets)); memset(sockets, 0xFF, sizeof(sockets));