make sure existing nonblocking users still work

This commit is contained in:
toddouska 2012-09-28 15:10:35 -07:00
parent 2c25481e7d
commit e5c04e70a7
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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;
}