0

I had a function which emit a node in 15 min interval.Now if the node is fire from two browser the function is excited two times.while i want to get it execute only one at a time,no matter from how many client machine it get fried.I am using node.js and socket.io.is there is any way to do that.

server.js

socket.on('autobid',function(){

console.log('autobidcalltest');//get prints two time if fired from 2 browser

});
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
  • dirty: is a simple flag an option? Setting it to true when the function is executed the first time, and revert it when done? http://stackoverflow.com/questions/12713564/function-in-javascript-that-can-be-called-only-once – Robin Vinzenz Aug 21 '15 at 12:58
  • No the result is same,as the function is called at the same time – user3467405 Aug 21 '15 at 13:50

0 Answers0