socket fixed

This commit is contained in:
raja.blaze 2019-08-20 13:08:53 +05:30
parent d81ef51262
commit c82de3cae2
2 changed files with 5 additions and 2 deletions

View File

@ -187,9 +187,9 @@ console.log(__dirname);
}); });
const io = require("socket.io").listen(server); const io = require("socket.io").listen(server);
io.sockets.on("connection", socket => { io.sockets.on("connection", socket => {
setInterval(function() { //setTimeout(function() {
universalGetLatestBlockDetails(socket); universalGetLatestBlockDetails(socket);
},1000); //},1000);
}); });
}) })
.catch(error => { .catch(error => {

View File

@ -295,4 +295,7 @@ export async function universalGetLatestBlockDetails(socket) {
TotalDifficultyRandomx: TotalDifficultyRandomx:
BlockchainLatestBlockQuery[0].total_difficulty_randomx BlockchainLatestBlockQuery[0].total_difficulty_randomx
}); });
setTimeout(function() {
universalGetLatestBlockDetails(socket);
},1000);
} }