Skip to content

Commit df6f048

Browse files
authored
fix(node): Do not assert in vendored proxy code (v7 backport) (#11009)
1 parent 3fe6106 commit df6f048

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

packages/node/src/proxy/index.ts

-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
3030
/* eslint-disable @typescript-eslint/no-unused-vars */
31-
import assert from 'assert';
3231
import type * as http from 'http';
3332
import type { OutgoingHttpHeaders } from 'http';
3433
import * as net from 'net';
@@ -190,8 +189,6 @@ export class HttpsProxyAgent<Uri extends string> extends Agent {
190189
// Need to wait for the "socket" event to re-play the "data" events.
191190
req.once('socket', (s: net.Socket) => {
192191
debug('Replaying proxy buffer for failed request');
193-
assert(s.listenerCount('data') > 0);
194-
195192
// Replay the "buffered" Buffer onto the fake `socket`, since at
196193
// this point the HTTP module machinery has been hooked up for
197194
// the user.

0 commit comments

Comments
 (0)