[glib-networking/mcatanzaro/waiting-for-op] base: Don't initially cancel waiting_for_op



commit 5e521296ba2c714b5ffe85701eb465363977ac02
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed May 15 19:02:09 2019 -0500

    base: Don't initially cancel waiting_for_op
    
    This is mostly harmless, but it causes a spurious wakeup the first time
    a TLS source is created while an op is waiting. The cancellable source
    fires immediately instead of when the op is yielded.
    
    The cancellation here is not required for correctness because
    tls_source_sync() will use a timeout source instead if there is no op or
    IO waiting.

 tls/base/gtlsconnection-base.c | 1 -
 1 file changed, 1 deletion(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 76defda..4d8cdcc 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -222,7 +222,6 @@ g_tls_connection_base_init (GTlsConnectionBase *tls)
   g_mutex_init (&priv->op_mutex);
 
   priv->waiting_for_op = g_cancellable_new ();
-  g_cancellable_cancel (priv->waiting_for_op);
 }
 
 static void


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