diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-09-04 14:18:06 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2020-09-04 14:18:06 -0500 |
commit | 3d777801496fd7ad8525f33fd1451bf7fc51cbde (patch) | |
tree | 39ec366c9ade3b7ed6f8eb7c2e95e40a23fafe29 | |
parent | 6fde59894396995f1e9471dbe670a592d660905c (diff) | |
download | glib-networking-3d777801496fd7ad8525f33fd1451bf7fc51cbde.tar.gz |
Revert "Account for ongoing ops in check function"
This reverts commit 4a1aeda4d8dff96a8a9037d4639aa7b96c87f927.
-rw-r--r-- | tls/base/gtlsconnection-base.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c index 7001104..97ac24f 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. */ |