Skip to content

Commit 6ddbba6

Browse files
authored
fix(node): Do not assert in vendored proxy code (#11011)
1 parent e249f36 commit 6ddbba6

File tree

1 file changed

+0
-3
lines changed
  • packages/node-experimental/src/proxy

1 file changed

+0
-3
lines changed

packages/node-experimental/src/proxy/index.ts

Lines changed: 0 additions & 3 deletions
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';
@@ -188,8 +187,6 @@ export class HttpsProxyAgent<Uri extends string> extends Agent {
188187
// Need to wait for the "socket" event to re-play the "data" events.
189188
req.once('socket', (s: net.Socket) => {
190189
debug('Replaying proxy buffer for failed request');
191-
assert(s.listenerCount('data') > 0);
192-
193190
// Replay the "buffered" Buffer onto the fake `socket`, since at
194191
// this point the HTTP module machinery has been hooked up for
195192
// the user.

0 commit comments

Comments
 (0)