Skip to content

Commit b194182

Browse files
committed
Fix verbose when using httpsproxy
1 parent 8bad385 commit b194182

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
@@ -884,9 +884,9 @@ let api = function Binance( options = {} ) {
884884
} );
885885
ws = new WebSocket( ( Binance.options.test ? fstreamSingleTest : fstreamSingle ) + endpoint, { agent } );
886886
} else if ( httpsproxy !== false ) {
887-
if ( Binance.options.verbose ) Binance.options.log( `futuresSubscribeSingle: using proxy server: ${ agent }` );
888887
let config = url.parse( httpsproxy );
889888
let agent = new HttpsProxyAgent( config );
889+
if ( Binance.options.verbose ) Binance.options.log( `futuresSubscribeSingle: using proxy server: ${ agent }` );
890890
ws = new WebSocket( ( Binance.options.test ? fstreamSingleTest : fstreamSingle ) + endpoint, { agent } );
891891
} else {
892892
ws = new WebSocket( ( Binance.options.test ? fstreamSingleTest : fstreamSingle ) + endpoint );
@@ -1586,9 +1586,9 @@ let api = function Binance( options = {} ) {
15861586
} );
15871587
ws = new WebSocket( ( Binance.options.test ? dstreamSingleTest : dstreamSingle ) + endpoint, { agent } );
15881588
} else if ( httpsproxy !== false ) {
1589-
if ( Binance.options.verbose ) Binance.options.log( `deliverySubscribeSingle: using proxy server: ${ agent }` );
15901589
let config = url.parse( httpsproxy );
15911590
let agent = new HttpsProxyAgent( config );
1591+
if ( Binance.options.verbose ) Binance.options.log( `deliverySubscribeSingle: using proxy server: ${ agent }` );
15921592
ws = new WebSocket( ( Binance.options.test ? dstreamSingleTest : dstreamSingle ) + endpoint, { agent } );
15931593
} else {
15941594
ws = new WebSocket( ( Binance.options.test ? dstreamSingleTest : dstreamSingle ) + endpoint );

0 commit comments

Comments
 (0)