Skip to content

Commit b2c87c4

Browse files
committed
Don't hog COU when sending TLS data would block.
1 parent efeb5ec commit b2c87c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/WiFiClientSecure/src/ssl_client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, uint16_t l
247247
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE && ret < 0) {
248248
return handle_error(ret);
249249
}
250+
//wait for space to become available
251+
vTaskDelay(5/portTICK_PERIOD_MS);
250252
}
251253

252254
return ret;

0 commit comments

Comments
 (0)