tls: share socket._hadError with http_client