When making an Http1 request followed by disconnectAll() the process doesn't exit.
When running the following snippet the process hangs, i.e. node doesn't exit. It seems like disconnectAll() doesn't unref the socket.
const { fetch, disconnectAll } = require('fetch-h2');
(async function () {
const resp = await fetch('https://httpbin.org/status/200');
await disconnectAll();
}());
OTOH, when making an Http2 request, the process exits as expected:
const { fetch, disconnectAll } = require('fetch-h2');
(async function () {
const resp = await fetch('https://www.nghttp2.org/httpbin/status/200');
await disconnectAll();
}());
When making an Http1 request followed by
disconnectAll()the process doesn't exit.When running the following snippet the process hangs, i.e. node doesn't exit. It seems like
disconnectAll()doesn'tunrefthe socket.OTOH, when making an Http2 request, the process exits as expected: