gnutls: Race with claim_op in g_tls_connection_gnutls_handshake_async
@tester
Submitted by Olivier Crête Link to original bug (#760606)
Description
If I do "g_tls_connection_handshake_async(); g_input_stream_read_async();", I understand the read should fail with BUSY or the read should wait until the handshake has finished. But the async handshake doesn't call claim_op() immediately, but only in the another thread. So we get into a case where the read does claim_op before the handshake_thread from the explicit handshake has started, so it tries to start an implicit handshake, so you maybe end up with two handshake threads and everything does down from there!
Version: 2.47.x