Fix error handling in RAND_DRBG_set
[openssl.git] / apps / s_socket.c
index f4264cd9ff24193b2c4e32eec30491098caa2e6e..76f9289002076254ad84be0f863498d4297c84ee 100644 (file)
@@ -147,7 +147,7 @@ int init_client(int *sock, const char *host, const char *port,
 #endif
 
         if (!BIO_connect(*sock, BIO_ADDRINFO_address(ai),
-                         type == SOCK_STREAM ? BIO_SOCK_NODELAY : 0)) {
+                         protocol == IPPROTO_TCP ? BIO_SOCK_NODELAY : 0)) {
             BIO_closesocket(*sock);
             *sock = INVALID_SOCKET;
             continue;