crypto/tls: test for timeout error using the net.Error interface
crypto/tls: test for timeout error using the net.Error interface

Don't do a substring search to test for a timeout error.

Fixes #14722 (maybe)

Change-Id: I4e18c749d6fd92c084a1b0b83a805119e1ae5ff2
Reviewed-on: https://go-review.googlesource.com/20403
Run-TryBot: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
Reviewed-by: Keith Randall <8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

miolini/go,linux-on-ibm-z/go,ganboing/go-esx,vsekhar/elastic-go,cloudflare/go,Samurais/go,vsekhar/elastic-go,Cofyc/go,goodlang/good,linux-on-ibm-z/go,codestation/go,polyverse-security/go,ganboing/go-esx,momchil-velikov/go,4ad/go,goodlang/good,vsekhar/elastic-go,ganboing/go-esx,vanloswang/go,CAFxX/go,suncycheng/go,codestation/go,polyverse-security/go,polyverse-security/go,CAFxX/go,Cofyc/go,Cofyc/go,vsekhar/elastic-go,vanloswang/go,akutz/go,Samurais/go,goodlang/good,nawawi/go,vsekhar/elastic-go,theif519/go,Cofyc/go,suncycheng/go,linux-on-ibm-z/go,codestation/go,4ad/go,derekmarcotte/go,linux-on-ibm-z/go,codestation/go,Samurais/go,suncycheng/go,momchil-velikov/go,momchil-velikov/go,CAFxX/go,josharian/go,ImJasonH/go,Samurais/go,golang/go,akutz/go,nawawi/go,suncycheng/go,josharian/go,goodlang/good,theif519/go,theif519/go,polyverse-security/go,codestation/go,derekmarcotte/go,golang/go,vanloswang/go,suncycheng/go,christopher-henderson/Go,akutz/go,goodlang/good,theif519/go,CAFxX/go,vanloswang/go,derekmarcotte/go,akutz/go,CAFxX/go,miolini/go,momchil-velikov/go,josharian/go,derekmarcotte/go,4ad/go,vsekhar/elastic-go,linux-on-ibm-z/go,akutz/go,codestation/go,momchil-velikov/go,theif519/go,ImJasonH/go,nawawi/go,ganboing/go-esx,ImJasonH/go,josharian/go,golang/go,miolini/go,cloudflare/go,josharian/go,linux-on-ibm-z/go,linux-on-ibm-z/go,akutz/go,polyverse-security/go,nawawi/go,momchil-velikov/go,CAFxX/go,cloudflare/go,golang/go,ImJasonH/go,cloudflare/go,theif519/go,josharian/go,cloudflare/go,miolini/go,ganboing/go-esx,Cofyc/go,linux-on-ibm-z/go,Samurais/go,josharian/go,vanloswang/go,goodlang/good,ganboing/go-esx,momchil-velikov/go,ImJasonH/go,vsekhar/elastic-go,golang/go,derekmarcotte/go,cloudflare/go,ganboing/go-esx,suncycheng/go,4ad/go,derekmarcotte/go,golang/go,golang/go,Samurais/go,golang/go,ganboing/go-esx,derekmarcotte/go,Cofyc/go,vanloswang/go,cloudflare/go,miolini/go,Samurais/go,ImJasonH/go,CAFxX/go,4ad/go,nawawi/go,codestation/go,polyverse-security/go,miolini/go,CAFxX/go,suncycheng/go,Cofyc/go,codestation/go,Samurais/go,nawawi/go,akutz/go,goodlang/good,4ad/go,4ad/go,nawawi/go,goodlang/good,ImJasonH/go,akutz/go,miolini/go,vanloswang/go,miolini/go,vsekhar/elastic-go,josharian/go,polyverse-security/go,vanloswang/go,suncycheng/go,nawawi/go,Cofyc/go,polyverse-security/go,4ad/go,ImJasonH/go,theif519/go,theif519/go,momchil-velikov/go,cloudflare/go,derekmarcotte/go