title: NodeJS SteamBot (multiple tradeoffers)
body: <p>I have a Steam Tradebot system (written in NodeJS) and I have a problem with it. My bot is sending multiple tradeoffers after mysql select query(im updating the mysql row when the BOT is doing the SELECT query, but the select query runs again on the same row --> that's the problem). I tried to slow it down with a setTimeout inside the setInterval, but it's not working fine. This problem is happens for like every 50th time (more than 1 offer). How can I solve it? It's important because I need to check the tradeoffers by tradeofferID, and if the user is accepting the wrong one, my system will showing it as "not accepted".</p>
  
  <p>Here is my code: </p>
  
  <p><a href="http://pastebin.com/YCBChiY0" rel="nofollow">http://pastebin.com/YCBChiY0</a></p>
  
  <p>Is it caused because JS is async script?</p>
  
  <p>Thanks for your help!</p>