[libsoup/wip/http2] Revert extra read after need-more-data
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/http2] Revert extra read after need-more-data
- Date: Wed, 12 May 2021 19:45:18 +0000 (UTC)
commit cebce01a106113eee87846fe5fc0df2c00679706
Author: Patrick Griffis <pgriffis igalia com>
Date: Wed May 12 14:44:56 2021 -0500
Revert extra read after need-more-data
libsoup/http2/soup-body-input-stream-http2.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/libsoup/http2/soup-body-input-stream-http2.c b/libsoup/http2/soup-body-input-stream-http2.c
index 42e592dd..3fcc43e4 100644
--- a/libsoup/http2/soup-body-input-stream-http2.c
+++ b/libsoup/http2/soup-body-input-stream-http2.c
@@ -216,23 +216,18 @@ soup_body_input_stream_http2_read_nonblocking (GPollableInputStream *stream,
gsize read = soup_body_input_stream_http2_read_real (G_INPUT_STREAM (stream), FALSE, buffer, count,
NULL, &inner_error);
if (read == 0 && !priv->completed && !inner_error) {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, "Operation would block");
+
/* Try requesting more reads from the io backend */
- GError *read_error = NULL;
+ GError *inner_error = NULL;
g_signal_emit (memory_stream, signals[NEED_MORE_DATA], 0,
- NULL, FALSE, &read_error);
+ NULL, FALSE, &inner_error);
- if (read_error) {
- g_propagate_error (error, read_error);
- return -1;
- }
+ // TODO: Do we care?
+ g_clear_error (&inner_error);
- /* Immediately return any data read */
- read = soup_body_input_stream_http2_read_real (G_INPUT_STREAM (stream), FALSE, buffer,
count, NULL, &inner_error);
- if (read == 0) {
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, "Operation would
block");
return -1;
}
- }
if (inner_error)
g_propagate_error (error, inner_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]