title: Socket IO chat repeating user connected
body: <p>Using the basic chat example from the socket.io website, it initially worked for the past few days but now is completely malfunctioning. When console.logging to check if users are connected, I get a never ending 'user connected' status and am unable to post anything to the chat. here's the code:</p>
  
  <pre><code>var app = require('express')();
  var server = require('http').createServer(app);
  var io = require('socket.io')(server);
  var port = process.env.PORT || 3000;
  
  app.get('/', function(req, res){
  res.sendFile(__dirname + '/index.html');
  });
  
  io.on('connection', function(socket){
  console.log('user connected');
  socket.on('chat message', function(msg){
  io.emit('chat message', msg);
  });
  });
  
  server.listen(port, function(){
  console.log('listening on *:' + port);
  });
  </code></pre>