[tls socket] rm non-blocking i/o code

This commit is contained in:
alan crouau 2024-09-09 14:52:43 +02:00
parent 168a093508
commit 222cb6ba73

View file

@ -212,12 +212,9 @@ static int tls_read(lua_State *L) {
lua_pushnil(L);
return 1;
} else {
// All negative values are treated as errors
lua_pushnil(L);
if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
lua_pushstring(L, "EAGAIN");
} else {
lua_pushfstring(L, "Read error: %d", ret);
}
lua_pushfstring(L, "Read error: %d", ret);
return 2;
}
}