The quic_timer_handler() function runs in a separate thread, but sets tlshd_quic_conn::errcode with a non-atomic assignment. The field is also read non-atomically on the main thread.
Rather than changing all access to this field to be atomic, I think it would be more sensible to add a separate timeout flag that is accessed atomically and which the main thread can translate to errcode = ETIMEDOUT.