Skip to content

Commit 8594b29

Browse files
committed
fix failing tests
1 parent b434358 commit 8594b29

File tree

1 file changed

+3
-2
lines changed
  • packages/node/src/transports

1 file changed

+3
-2
lines changed

packages/node/src/transports/http.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
} from '@sentry/types';
99
import * as http from 'http';
1010
import * as https from 'https';
11-
import * as createHttpsProxyAgent from 'https-proxy-agent';
11+
import * as httpsProxyAgent from 'https-proxy-agent';
1212
import { Readable } from 'stream';
1313
import { URL } from 'url';
1414
import { createGzip } from 'zlib';
@@ -75,7 +75,8 @@ export function makeNodeTransport(options: NodeTransportOptions): Transport {
7575
// TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node
7676
// versions(>= 8) as they had memory leaks when using it: #2555
7777
const agent = proxy
78-
? createHttpsProxyAgent(proxy)
78+
? // @ts-ignore this actually is a constructor but the library exports it super weirdly
79+
(new httpsProxyAgent(proxy) as http.Agent)
7980
: new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 });
8081

8182
const requestExecutor = createRequestExecutor(options, options.httpModule ?? nativeHttpModule, agent);

0 commit comments

Comments
 (0)