[libsoup/libsoup-3-0] http2: check error/progress before session want read/write
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/libsoup-3-0] http2: check error/progress before session want read/write
- Date: Fri, 2 Sep 2022 10:20:30 +0000 (UTC)
commit 4ea03a441680e753476966dbad245582b5440493
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Aug 29 09:19:19 2022 +0200
http2: check error/progress before session want read/write
libsoup/http2/soup-client-message-io-http2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 05a8c99a..17a70f59 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -398,7 +398,7 @@ io_write_ready (GObject *stream,
return G_SOURCE_REMOVE;
}
- while (nghttp2_session_want_write (io->session) && !error)
+ while (!error && nghttp2_session_want_write (io->session))
io_write (io, FALSE, NULL, &error);
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) {
@@ -426,7 +426,7 @@ io_try_write (SoupClientMessageIOHTTP2 *io,
if (blocking || !nghttp2_session_want_write (io->session))
return;
} else {
- while (nghttp2_session_want_write (io->session) && !error)
+ while (!error && nghttp2_session_want_write (io->session))
io_write (io, blocking, NULL, &error);
}
@@ -480,7 +480,7 @@ io_read_ready (GObject *stream,
if (io->conn)
soup_connection_set_in_use (io->conn, TRUE);
- while (nghttp2_session_want_read (io->session) && progress) {
+ while (progress && nghttp2_session_want_read (io->session)) {
progress = io_read (io, FALSE, NULL, &error);
if (progress) {
g_list_foreach (io->pending_io_messages,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]