Could you please provide more details? A test case which demonstrates the problem would be helpful, as well as "nginx -V".
Note that threaded operations are not expected to access connection structures, but rather implement simple primitives, such as reading from a file, writing to a file, or sending a file with the sendfile()
syscall to a specific socket. As such, it is certainly not possible that multiple threads can operate on the same connection structure. Further, the ngx_ssl_shutdown()
function you've linked is not expected to be called unless all background subrequests have been completed. If you observe issues with a particular configuration, there should be another explanation.