Set errno to EAGAIN when push on SSL connection blocked. (#1754)

This commit is contained in:
xiehan
2025-07-16 16:29:21 +08:00
committed by GitHub
parent 31a1bed910
commit 8586413a3e

View File

@@ -192,7 +192,9 @@ int CommMessageIn::feedback(const void *buf, size_t size)
if (ret <= 0)
{
ret = SSL_get_error(entry->ssl, ret);
if (ret != SSL_ERROR_SYSCALL)
if (ret == SSL_ERROR_WANT_READ || ret == SSL_ERROR_WANT_WRITE)
errno = EAGAIN;
else if (ret != SSL_ERROR_SYSCALL)
errno = -ret;
ret = -1;