From 7744f0d543141c125aca907bc995cc29b7843ff9 Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Thu, 13 Aug 2020 15:33:20 -0500 Subject: [PATCH] Check for non-blocking return code in BioSend --- src/wolfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wolfio.c b/src/wolfio.c index 95bb6171f..3c060c6a6 100644 --- a/src/wolfio.c +++ b/src/wolfio.c @@ -181,7 +181,7 @@ int BioSend(WOLFSSL* ssl, char *buf, int sz, void *ctx) if (ssl->biowr->method && ssl->biowr->method->writeCb) { WOLFSSL_MSG("Calling custom biowr"); sent = ssl->biowr->method->writeCb(ssl->biowr, buf, sz); - if (sent < 0) { + if ((sent < 0) && (sent != WOLFSSL_CBIO_ERR_WANT_WRITE)) { return WOLFSSL_CBIO_ERR_GENERAL; } return sent;