We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3b0e04 commit c750a23Copy full SHA for c750a23
1 file changed
src/mongoPatch.ts
@@ -16,8 +16,7 @@ interface Config {
16
export function useProxyForMongo(config: Config) {
17
let sockets: tls.TLSSocket[] = [];
18
socks.SocksClient.createConnection = async (options, callback) => {
19
- options.existing_socket?.destroy();
20
- const socket = await new HttpsProxySocket(`https://${config.proxy}`, { auth: config.auth }).connect({
+ const socket = await new HttpsProxySocket({ socket: options.existing_socket }, { auth: config.auth }).connect({
21
host: options.destination.host,
22
port: options.destination.port,
23
});
0 commit comments