diff --git a/server.ts b/server.ts index c659873..a3e9d69 100644 --- a/server.ts +++ b/server.ts @@ -187,9 +187,9 @@ console.log(__dirname); }); const io = require("socket.io").listen(server); io.sockets.on("connection", socket => { - setInterval(function() { + //setTimeout(function() { universalGetLatestBlockDetails(socket); - },1000); + //},1000); }); }) .catch(error => { diff --git a/server/socket/block.ts b/server/socket/block.ts index 8e52871..2d82e38 100644 --- a/server/socket/block.ts +++ b/server/socket/block.ts @@ -295,4 +295,7 @@ export async function universalGetLatestBlockDetails(socket) { TotalDifficultyRandomx: BlockchainLatestBlockQuery[0].total_difficulty_randomx }); + setTimeout(function() { + universalGetLatestBlockDetails(socket); + },1000); }