8000 [rush-lib] Fix issue with `MaxListenersExceeded` while using the HTTP… · OlliMartin/rushstack@e5560f2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e5560f2

Browse files
authored
[rush-lib] Fix issue with MaxListenersExceeded while using the HTTP build cache plugin (microsoft#5073)
* Remove the socket error handler for WebClient * Rush change * Remove unused import --------- Co-authored-by: Daniel <D4N14L@users.noreply.github.com>
1 parent dcfc223 commit e5560f2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Fix an issue where MaxListenersExceeded would get thrown when using the HTTP build cache plugin",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush"
10+
}

libraries/rush-lib/src/utilities/WebClient.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import * as process from 'process';
66
import type * as http from 'http';
77
import { request as httpRequest, type IncomingMessage } from 'node:http';
88
import { request as httpsRequest, type RequestOptions } from 'node:https';
9-
import type { Socket } from 'node:net';
109
import { Import, LegacyAdapters } from '@rushstack/node-core-library';
1110

1211
const createHttpsProxyAgent: typeof import('https-proxy-agent') = Import.lazy('https-proxy-agent', require);
@@ -199,11 +198,6 @@ const makeRequestAsync: FetchFn = async (
199198
resolve(result);
200199
});
201200
})
202-
.on('socket', (socket: Socket) => {
203-
socket.on('error', (error: Error) => {
204-
reject(error);
205-
});
206-
})
207201
.on('error', (error: Error) => {
208202
reject(error);
209203
})

0 commit comments

Comments
 (0)
0