Skip to content
  • Dan Winship's avatar
    gio/tests/tls-interaction: fix two sporadic errors · 15f1ba47
    Dan Winship authored
    The threaded tests are using the default main context in the worker
    thread, but were not g_main_context_acquire()ing it first, which meant
    that g_tls_interaction_invoke_ask_password() in the main thread would
    sometimes succeed in acquiring it itself and thus performing the
    operation in the wrong thread. Fix that.
    
    Also, we can't unref the loop from the worker thread, because the main
    thread isn't holding a reference on it, and so it might end up being
    destroyed while that thread is still inside g_main_loop_quit().
    15f1ba47