From f9a28a9ce86473d934693fe59dcbe344ffbc695e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 18 Apr 2024 14:54:28 +0200 Subject: [PATCH] ustream-ssl: poll connection on incomplete reads Reduces uloop roundtrips Signed-off-by: Felix Fietkau --- ustream-ssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ustream-ssl.c b/ustream-ssl.c index c4e7971..4af5a44 100644 --- a/ustream-ssl.c +++ b/ustream-ssl.c @@ -84,6 +84,11 @@ static bool __ustream_ssl_poll(struct ustream *s) break; ret = __ustream_ssl_read(us, buf, len); + if (ret == U_SSL_PENDING) { + ustream_poll(us->conn); + ret = __ustream_ssl_read(us, buf, len); + } + switch (ret) { case U_SSL_PENDING: return more; -- 2.30.2