mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
make sure existing nonblocking users still work
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
int timeout_count = CyaSSL_dtls_get_current_timeout(ssl) * 10;
|
int timeout_count = CyaSSL_dtls_get_current_timeout(ssl) * 10;
|
||||||
while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ ||
|
while (ret != SSL_SUCCESS && (error == SSL_ERROR_WANT_READ ||
|
||||||
error == SSL_ERROR_WANT_WRITE)) {
|
error == SSL_ERROR_WANT_WRITE)) {
|
||||||
|
(void)timeout_count;
|
||||||
if (error == SSL_ERROR_WANT_READ)
|
if (error == SSL_ERROR_WANT_READ)
|
||||||
printf("... client would read block\n");
|
printf("... client would read block\n");
|
||||||
else
|
else
|
||||||
|
2
src/io.c
2
src/io.c
@@ -167,7 +167,7 @@ int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx)
|
|||||||
CYASSL_MSG("Embed Receive error");
|
CYASSL_MSG("Embed Receive error");
|
||||||
|
|
||||||
if (err == SOCKET_EWOULDBLOCK || err == SOCKET_EAGAIN) {
|
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");
|
CYASSL_MSG(" Would block");
|
||||||
return IO_ERR_WANT_READ;
|
return IO_ERR_WANT_READ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user