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



commit 0010d20a440d9378a4496e0cc00f05f0bbb2ac40
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 9a22464..f0a75ca 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -729,6 +729,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]