Fix bogus use of BIO_sock_should_retry.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 17 Jul 2017 09:51:19 +0000 (11:51 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 17 Jul 2017 13:36:41 +0000 (15:36 +0200)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3948)

(cherry picked from commit daaaa3cb7e506466b38de995b3e5149f4045bdff)

apps/s_socket.c

index 0cbe88514d55ff0be913d29ad17174785aa8882f..7f01112afb912b943d937485f2e954d86b126ab9 100644 (file)
@@ -171,7 +171,7 @@ int do_server(int *accept_sock, const char *host, const char *port,
         if (type == SOCK_STREAM) {
             do {
                 sock = BIO_accept_ex(asock, NULL, 0);
-            } while (sock < 0 && BIO_sock_should_retry(ret));
+            } while (sock < 0 && BIO_sock_should_retry(sock));
             if (sock < 0) {
                 ERR_print_errors(bio_err);
                 BIO_closesocket(asock);