[glib-networking] Revert "Account for ongoing ops in check function"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Revert "Account for ongoing ops in check function"
- Date: Fri, 4 Sep 2020 19:19:08 +0000 (UTC)
commit 3d777801496fd7ad8525f33fd1451bf7fc51cbde
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Sep 4 14:18:06 2020 -0500
Revert "Account for ongoing ops in check function"
This reverts commit 4a1aeda4d8dff96a8a9037d4639aa7b96c87f927.
tls/base/gtlsconnection-base.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 7001104e..97ac24fa 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -907,12 +907,14 @@ g_tls_connection_base_check (GTlsConnectionBase *tls,
if (priv->need_finish_handshake)
return TRUE;
- /* If op or close is in progress, then tls_istream and tls_ostream are
- * blocked, regardless of the base stream status. Note this also
- * accounts for handshake ops.
+ /* If a handshake or close is in progress, then tls_istream and
+ * tls_ostream are blocked, regardless of the base stream status.
*/
- if (((condition & G_IO_IN) && (priv->reading || priv->read_closing)) ||
- ((condition & G_IO_OUT) && (priv->writing || priv->write_closing)))
+ if (priv->handshaking)
+ return FALSE;
+
+ if (((condition & G_IO_IN) && priv->read_closing) ||
+ ((condition & G_IO_OUT) && priv->write_closing))
return FALSE;
/* Defer to the base stream or GDatagramBased. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]