mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-19 14:19:06 -04:00
fix(crypto-nodejs): Set KeepAlive to false since Node.js v19
Disable keepAlive in download-lib.js, allowing node bindings to work on Node.JS 19
This commit is contained in:
2
.github/workflows/bindings_ci.yml
vendored
2
.github/workflows/bindings_ci.yml
vendored
@@ -92,7 +92,7 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node-version: [14.0, 16.0, 18.0]
|
||||
node-version: [14.0, 16.0, 18.0, 19.0]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
os-name: 🐧
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const { Agent } = require('https');
|
||||
const { DownloaderHelper } = require('node-downloader-helper');
|
||||
const { version } = require("./package.json");
|
||||
const { platform, arch } = process
|
||||
@@ -22,6 +23,11 @@ function download_lib(libname) {
|
||||
console.info(`Downloading lib ${libname} from ${url}`);
|
||||
const dl = new DownloaderHelper(url, __dirname, {
|
||||
override: true,
|
||||
httpsRequestOptions: {
|
||||
// Disable keepalive to prevent the process hanging open.
|
||||
// https://github.com/matrix-org/matrix-rust-sdk/issues/1160
|
||||
agent: new Agent({ keepAlive: false }),
|
||||
},
|
||||
});
|
||||
|
||||
dl.on('end', () => console.info('Download Completed'));
|
||||
|
||||
Reference in New Issue
Block a user