check if clientfd != SOCKET_INVALID not 0, add check if USE_WINDOWS_API

not defined
This commit is contained in:
Ruby Martin
2025-01-28 13:45:07 -07:00
parent d37e566d5d
commit 57646a88ff
2 changed files with 13 additions and 10 deletions

View File

@ -452,6 +452,8 @@ generate_port() {
port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512))
elif [[ "$OSTYPE" == "darwin"* ]]; then
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
elif [[ "$OSTYPE" == "msys" ]]; then
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
else
echo "Unknown OS TYPE"
exit 1