Does HttpClient open two TLS connection instead of just one? #48652
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-duplicate
Closed in favor of an existing report
library-io
I think the Dart
HttpClient
opens two TLS connections to a server and that causes a problem for me.I'm working with self-signed certificates and have a required client certificate.
Here's a minimal Dart client:
Here's a minimal Node.js server:
I run the server with
NODE_DEBUG=tls,https node server.js
.Here's the trace for
curl
:And here's the trace when running the Dart client:
Notice the
ECONNRESET
error and notice hownew TLSSocket
appears twice.It looks like Dart is establishing two connections to the server, then retracting on of them.
I think this is a problem, because the "real" server I'm talking to, will stop talking to my client on the first error. The Node.js server is more forgiving. It will eventually respond with "welcome" and talk to Dart.
Here's my Dart version. I'm working on macOS:
The text was updated successfully, but these errors were encountered: