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



commit 2404164ca497e434579e9593ca49daeccb301148
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 8101fcc..c493895 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]