Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 4676c47

Browse files
committed
remove socket close as no one using it
1 parent b77a999 commit 4676c47

File tree

1 file changed

+1
-14
lines changed
  • src/javascript/binary/websocket_pages

1 file changed

+1
-14
lines changed

src/javascript/binary/websocket_pages/socket.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const BinarySocketClass = function() {
3939

4040
let binarySocket,
4141
bufferedSends = [],
42-
manualClosed = false,
4342
events = {},
4443
authorized = false,
4544
req_number = 0,
@@ -195,7 +194,6 @@ const BinarySocketClass = function() {
195194
}
196195
if (typeof es === 'object') {
197196
bufferedSends = [];
198-
manualClosed = false;
199197
events = es;
200198
clearTimeouts();
201199
}
@@ -347,7 +345,7 @@ const BinarySocketClass = function() {
347345
authorized = false;
348346
clearTimeouts();
349347

350-
if (!manualClosed && wrongAppId !== getAppId()) {
348+
if (wrongAppId !== getAppId()) {
351349
const toCall = State.get('is_trading') ? TradePage.onDisconnect :
352350
State.get('is_beta_trading') ? TradePage_Beta.onDisconnect :
353351
State.get('is_mb_trading') ? MBTradePage.onDisconnect : '';
@@ -370,26 +368,15 @@ const BinarySocketClass = function() {
370368
};
371369
};
372370

373-
const close = function () {
374-
manualClosed = true;
375-
bufferedSends = [];
376-
events = {};
377-
if (binarySocket) {
378-
binarySocket.close();
379-
}
380-
};
381-
382371
const clear = function() {
383372
bufferedSends = [];
384-
manualClosed = false;
385373
events = {};
386374
};
387375

388376
return {
389377
init : init,
390378
wait : wait,
391379
send : send,
392-
close : close,
393380
socket : function () { return binarySocket; },
394381
clear : clear,
395382
clearTimeouts: clearTimeouts,

0 commit comments

Comments
 (0)