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



commit 2b6503c603cca3e37e70a58cd3d1b778a4e45468
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 44ecbdd..b75e522 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]