From e88d6c2c13e419efb7ad3ebd7db0c835b22191d4 Mon Sep 17 00:00:00 2001 From: Tellsanguis Date: Mon, 2 Mar 2026 23:28:01 +0100 Subject: [PATCH] Fix plugin RSS: agent: false pour fermer les connexions HTTP --- plugins/docusaurus-plugin-rss-aggregator/index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/docusaurus-plugin-rss-aggregator/index.js b/plugins/docusaurus-plugin-rss-aggregator/index.js index d059669..aedee28 100644 --- a/plugins/docusaurus-plugin-rss-aggregator/index.js +++ b/plugins/docusaurus-plugin-rss-aggregator/index.js @@ -2,8 +2,6 @@ const Parser = require('rss-parser'); const { XMLParser } = require('fast-xml-parser'); const fs = require('fs'); const path = require('path'); -const https = require('https'); -const http = require('http'); const PER_REQUEST_TIMEOUT_MS = 20_000; const GLOBAL_TIMEOUT_MS = 600_000; @@ -22,13 +20,10 @@ module.exports = function (context, options) { async loadContent() { console.log('[RSS Aggregator] Récupération des flux RSS...'); - const httpAgent = new http.Agent({ keepAlive: false }); - const httpsAgent = new https.Agent({ keepAlive: false }); - const parser = new Parser({ timeout: PER_REQUEST_TIMEOUT_MS, requestOptions: { - agent: { http: httpAgent, https: httpsAgent } + agent: false }, customFields: { item: ['description', 'content:encoded'] @@ -107,8 +102,6 @@ module.exports = function (context, options) { } clearTimeout(globalTimeoutId); - httpAgent.destroy(); - httpsAgent.destroy(); const groupedByCategory = new Map();