diff --git a/src/PlatformSockets.c b/src/PlatformSockets.c index 160560b..3ba3bb1 100644 --- a/src/PlatformSockets.c +++ b/src/PlatformSockets.c @@ -366,11 +366,8 @@ SOCKET bindUdpSocket(int addressFamily, struct sockaddr_storage* localAddr, SOCK } else if (bufferSize <= RCV_BUFFER_SIZE_MIN) { // Failed to set a buffer size within the allowable range - err = LastSocketError(); - Limelog("Set rcv buffer size failed: %d\n", err); - closeSocket(s); - SetLastSocketError(err); - return INVALID_SOCKET; + Limelog("Set rcv buffer size failed: %d\n", LastSocketError()); + break; } else if (bufferSize - RCV_BUFFER_SIZE_STEP <= RCV_BUFFER_SIZE_MIN) { // Last shot - we're trying the minimum