Skip to content

Commit 70f0cb1

Browse files
authored
Fix verbose when using httpsproxy by fanazhe
2 parents 491f22d + b194182 commit 70f0cb1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

node-binance-api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,9 @@ let api = function Binance( options = {} ) {
888888
} );
889889
ws = new WebSocket( ( Binance.options.test ? fstreamSingleTest : fstreamSingle ) + endpoint, { agent } );
890890
} else if ( httpsproxy !== false ) {
891-
if ( Binance.options.verbose ) Binance.options.log( `futuresSubscribeSingle: using proxy server: ${ agent }` );
892891
let config = url.parse( httpsproxy );
893892
let agent = new HttpsProxyAgent( config );
893+
if ( Binance.options.verbose ) Binance.options.log( `futuresSubscribeSingle: using proxy server: ${ agent }` );
894894
ws = new WebSocket( ( Binance.options.test ? fstreamSingleTest : fstreamSingle ) + endpoint, { agent } );
895895
} else {
896896
ws = new WebSocket( ( Binance.options.test ? fstreamSingleTest : fstreamSingle ) + endpoint );
@@ -1592,9 +1592,9 @@ let api = function Binance( options = {} ) {
15921592
} );
15931593
ws = new WebSocket( ( Binance.options.test ? dstreamSingleTest : dstreamSingle ) + endpoint, { agent } );
15941594
} else if ( httpsproxy !== false ) {
1595-
if ( Binance.options.verbose ) Binance.options.log( `deliverySubscribeSingle: using proxy server: ${ agent }` );
15961595
let config = url.parse( httpsproxy );
15971596
let agent = new HttpsProxyAgent( config );
1597+
if ( Binance.options.verbose ) Binance.options.log( `deliverySubscribeSingle: using proxy server: ${ agent }` );
15981598
ws = new WebSocket( ( Binance.options.test ? dstreamSingleTest : dstreamSingle ) + endpoint, { agent } );
15991599
} else {
16001600
ws = new WebSocket( ( Binance.options.test ? dstreamSingleTest : dstreamSingle ) + endpoint );

0 commit comments

Comments
 (0)