This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
src/javascript/binary/websocket_pages Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ const BinarySocketClass = function() {
39
39
40
40
let binarySocket ,
41
41
bufferedSends = [ ] ,
42
- manualClosed = false ,
43
42
events = { } ,
44
43
authorized = false ,
45
44
req_number = 0 ,
@@ -195,7 +194,6 @@ const BinarySocketClass = function() {
195
194
}
196
195
if ( typeof es === 'object' ) {
197
196
bufferedSends = [ ] ;
198
- manualClosed = false ;
199
197
events = es ;
200
198
clearTimeouts ( ) ;
201
199
}
@@ -347,7 +345,7 @@ const BinarySocketClass = function() {
347
345
authorized = false ;
348
346
clearTimeouts ( ) ;
349
347
350
- if ( ! manualClosed && wrongAppId !== getAppId ( ) ) {
348
+ if ( wrongAppId !== getAppId ( ) ) {
351
349
const toCall = State . get ( 'is_trading' ) ? TradePage . onDisconnect :
352
350
State . get ( 'is_beta_trading' ) ? TradePage_Beta . onDisconnect :
353
351
State . get ( 'is_mb_trading' ) ? MBTradePage . onDisconnect : '' ;
@@ -370,26 +368,15 @@ const BinarySocketClass = function() {
370
368
} ;
371
369
} ;
372
370
373
- const close = function ( ) {
374
- manualClosed = true ;
375
- bufferedSends = [ ] ;
376
- events = { } ;
377
- if ( binarySocket ) {
378
- binarySocket . close ( ) ;
379
- }
380
- } ;
381
-
382
371
const clear = function ( ) {
383
372
bufferedSends = [ ] ;
384
- manualClosed = false ;
385
373
events = { } ;
386
374
} ;
387
375
388
376
return {
389
377
init : init ,
390
378
wait : wait ,
391
379
send : send ,
392
- close : close ,
393
380
socket : function ( ) { return binarySocket ; } ,
394
381
clear : clear ,
395
382
clearTimeouts : clearTimeouts ,
You can’t perform that action at this time.
0 commit comments