Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
crypto/tls: client connection is staying open after server has closed it #34796
What version of Go are you using (
This is due to a fundamental protocol difference between TLS 1.3 (enabled in Go 1.13) and TLS 1.2: client certificates are checked by the server after the client finished the handshake (this saves a whole round-trip), so the error is only sent to the client after Handshake and Dial have returned. To catch it in a test you have to do a Read on the client side.