[glib-networking/mcatanzaro/#20: 15/18] Always notify on op completion




commit f561e162326f3e6c3f88a28f65c0989c9e1d935b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Jan 26 14:47:42 2020 -0600

    Always notify on op completion
    
    Currently we only reset the cancellable in claim_op() when an op needs
    to wait. In theory, that's not quite enough, because it means our
    GCancellableSource might not always fire here.

 tls/base/gtlsconnection-base.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 1f4e1c76..5d8ab2b4 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -735,6 +735,7 @@ yield_op (GTlsConnectionBase       *tls,
   if (op != G_TLS_CONNECTION_BASE_OP_READ)
     priv->writing = FALSE;
 
+  g_cancellable_reset (priv->waiting_for_op);
   g_cancellable_cancel (priv->waiting_for_op);
   g_mutex_unlock (&priv->op_mutex);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]