grantila / fetch-h2

HTTP/1+2 Fetch API client for Node.js
MIT License
336 stars 16 forks source link

fix: https connect timeout #100

Open stefan-guggisberg opened 4 years ago

stefan-guggisberg commented 4 years ago

fixes TLS connection timeout handling.

Example:

  const { context } = require('fetch-h2');
  const { fetch } = context({ session: { timeout: 500 } });
  fetch('https://example.com:81/').catch{(err) => console.log(err));
  // prints "connect timed out after 500 ms"

partial (https only) fix for #99

stefan-guggisberg commented 4 years ago

@grantila Could you please have a look at this PR and #99 ? It's a serious problem for us.