title: limited-time control in trun-based game [node.js]
body: <p>I'm creating a card game like Crazy Eights. And I already publish prototype.</p>
  
  <p>Look here <a href="http://himapoyo.com" rel="nofollow">http://himapoyo.com</a></p>
  
  <p>And next, I want to implement limited-time(5 seconds per a turn) If turn-player don't play, I wanna make server skip its player. I write the code and run on browsers but it doesn't work.</p>
  
  <pre><code>function Table(tableID, name){
      this.id = tableID;
      this.name = name;
      this.players = [];
      this.deck = [];
      this.aCardOnTable = -1;
  
      this.turn = 0;
      this.reverse = false;
      this.clearid = 0;
      this.count = 0;
  };
  
  Table.prototype.nextPlayer = function(){
      if(this.reverse === false) {
          if(this.turn &gt;= this.players.length - 1) {
              this.turn = 0;
          } else {
              this.turn += 1;
          }
      }
      if(this.reverse === true) {
          if(this.turn &lt;= 0) {
              this.turn = this.players.length - 1;
          } else {
              this.turn -= 1;
          }
      }
  
      clearInterval(this.clearid);
      var that = this;
      var countup = function(){
          console.log(that.count++);
      }
      that.clearid = setInterval(function(){
  
          countup();
          if(that.count &gt; 5){　
              clearInterval(that.clearid);
              that.nextPlayer();
              //update_playerlist(table);
          }
      }, 1000);
  };
  </code></pre>
  
  <p>error message</p>
  
  <pre><code>Missing error handler on `socket`.
  RangeError: Maximum call stack size exceeded
      at _hasBinary (/Users/ryu/Desktop/poker/node_modules/socket.io/node_modules/has-binary/index.js:48:16)
  </code></pre>
  
  <p>QUESTION: how can I fix this error?</p>