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




commit f90a365c6ed5dc37a85c40008bcd2a8650e668ef
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 eee70cb..d06a97e 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]