Commit b2fee23b by zihan

改回只用1个ws试试

parent db2f2afc
......@@ -10,6 +10,8 @@ const constants = require('./constants');
const {IPs, mergeDepth} = require('./util');
let totalOrderbook = {};
//todo 这里还要处理浮点数运算的问题
let getUpdatedData = function (currentData, response) {
const updateData = [];
let newCount = 0;
......@@ -100,12 +102,12 @@ class biboxApi {
console.log("fetch ws token error");
this.subscribeSymbols(symbols, depth, callback);
}else{
for(let i=0;i<3;i++){
const ip = IPs.length >i ? IPs[i]:IPs[IPs.length -1];
setTimeout(()=>{
// for(let i=0;i<3;i++){
const ip = IPs[0];
// setTimeout(()=>{
this._openWs(result, symbols, depth,ip, callback);
},i*10000);
}
// },i*10000);
// }
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment