node.js - Socket 1.0 repeating connect multiple times -
I am using Heroku + RedisToGo + Express 4.0 + socket.io 1.0.6. I have recently advanced from 0.9 to 1.0, and now half of it is working. I've hoped an app from the tutorial, but the socket I am lacking in understanding I, so I am taking a step back. My first question is that now socket.on ('connect') is happening frequently, without restriction, even when a connection is successful my client-side console.log is just going There is a client-side here: // Connect to user socket. On ('connect', function) {var currentUserId = '& lt;% = currentUser.id% & Gt; '; // Add user to rediscovery Socket.emit ('login', {userID: currentUserId}); // Retrieve attendance information socket.emit ('presence');}); // Show attendance socket ('Appearance', function (data) {var userID = data.user; var appearance = datasource; if (presence) {$ ('# red-dot-' + userID) .css ("display", "any $ ('# Green-dot-' + use...