diff --git a/examples/client/client.c b/examples/client/client.c index 6e9c23f95..6fc1023d8 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -51,6 +51,7 @@ int timeout_count = CyaSSL_dtls_get_current_timeout(ssl) * 10; while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE)) { + (void)timeout_count; if (error == SSL_ERROR_WANT_READ) printf("... client would read block\n"); else diff --git a/src/io.c b/src/io.c index a956f4396..d80848210 100644 --- a/src/io.c +++ b/src/io.c @@ -167,7 +167,7 @@ int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx) CYASSL_MSG("Embed Receive error"); if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) { - if (CyaSSL_get_using_nonblock(ssl)) { + if (!CyaSSL_dtls(ssl) || CyaSSL_get_using_nonblock(ssl)) { CYASSL_MSG(" Would block"); return IO_ERR_WANT_READ; }