+
Skip to content

Cant make more than 1 request in parallel #35

@HoshenKadosh

Description

@HoshenKadosh

when i try to make more than 1 request - only one gets an ok status, and the others return an error without any detail.

code:

const { get } = require("http2-client");

for (let index = 0; index < 2; index++) {
  const req2 = get("https://nghttp2.org/httpbin/get", (e) =>
    console.log("OK", e.statusCode, e.httpVersion)
  );
  req2.on("error", (z) => console.error("ERROR", z));
}

output:

ERROR {
  createConnection: [Function: createConnection],
  protocol: 'https:',
  hostname: 'nghttp2.org',
  hash: '',
  search: '',
  pathname: '/httpbin/get',
  path: '/httpbin/get',
  href: 'https://nghttp2.org/httpbin/get',
  port: 443,
  method: 'GET',
  headers: { ':method': 'GET', ':path': '/httpbin/get' }
}
OK 200 2.0

node version: 18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载