make sure existing nonblocking users still work
This commit is contained in:
parent
2c25481e7d
commit
e5c04e70a7
@ -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
|
||||
|
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");
|
||||
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user