fix no room

This commit is contained in:
Sergio R. Caprile committed 2026-06-05 16:59:44 -03:00
1 parent db658918c6
commit 416dc7beae
4 files changed
+16 -10

No files matched your search

+1 -1
View File
@@ -201,7 +201,7 @@ size_t mg_tls_pending(struct mg_connection *c) {
long mg_tls_recv(struct mg_connection *c, void *buf, size_t len) {
struct mg_tls *tls = (struct mg_tls *) c->tls;
long n = mbedtls_ssl_read(&tls->ssl, (unsigned char *) buf, len);
if (!c->is_tls_hs && buf == NULL && n == 0) return 0; // TODO(): MIP
if (!c->is_tls_hs && (buf == NULL || len == 0) && n == 0) return 0; // MIP
if (n == MBEDTLS_ERR_SSL_WANT_READ || n == MBEDTLS_ERR_SSL_WANT_WRITE)
return MG_IO_WAIT;
#if defined(MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET)