Skip to content

Commit e325727

Browse files
fixed random await
1 parent ef4b5c6 commit e325727

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/HttpsProxySocket.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class HttpsProxySocket {
5151
*/
5252
connect(options: ConnectionOptions): Promise<tls.TLSSocket> {
5353
return new Promise<tls.TLSSocket>(async (resolve, reject) => {
54-
await this._connect(options, (error, socket) => {
54+
this._connect(options, (error, socket) => {
5555
if (error) {
5656
reject(error);
5757
} else {
@@ -73,7 +73,7 @@ export class HttpsProxySocket {
7373
return createProxyAgent(this, options);
7474
}
7575

76-
private async _connect(opts: ConnectionOptions, cb: (error: any, socket: tls.TLSSocket | null) => void) {
76+
private _connect(opts: ConnectionOptions, cb: (error: any, socket: tls.TLSSocket | null) => void) {
7777
const proxy = this.proxy;
7878

7979
// create a socket connection to the proxy server

0 commit comments

Comments
 (0)