title: Node.js connection error, missing property?
body: <p><strong>EDIT</strong></p>
  
  <p><strong>Solution:</strong></p>
  
  <p>Visit your IP in the browser after you "node server.js" to kick-start the connections. Dunno why it works, but it does for me.</p>
  
  <p><strong>How it came to be</strong></p>
  
  <p>Mkay.. after making a rebuild of the slice (hosted at slicehost if that matters) and reinstalling node and websocket-server I still had the same issue. I checked if a normal request worked (entering the IP in the browser) which it did. It also seemed to kick-start the socket connections, so I could now connect through those too.</p>
  
  <hr>
  
  <p>I'm trying to connect to a socket server using node.js and the websocket-server module.</p>
  
  <p>Server side looks like this:</p>
  
  <pre><code>   var server = ws.createServer();
     server.listen(80);
  
     server.addListener("request", function(req, res) {
  
     res.writeHead(200, {
      "Content-Type": "text/plain"
     });
     res.write("Hey! This is totally not the site you planned to visit.");
     res.end();
     });
  
    server.addListener("connection", function(conn) {
  
     conn.addListener("readyStateChange", function(readyState) {
  
     });
     conn.addListener("open", function() {
  
     });
     conn.addListener("close", function() {
  
     });
     conn.addListener("message", function(message) {
      server.broadcast(conn._id + ": "+message);
     });
   });
  </code></pre>
  
  <p>Standard procedure. When trying to connect from the client like this...</p>
  
  <pre><code>   if ( window["WebSocket"] ) {
  
              connection = new WebSocket("ws://[my IP]:80/");
              connection.onopen = function( event ) {
                  console.log("connection open");
              }
  
              connection.onclose = function( event ) {
                  console.log("connection closed");
              }
  
              connection.onerror= function( event ) {
                  console.log("connection error");
              }
  
              connection.onmessage = function( event ) {
                  console.log(event.data);
              };
          }
  </code></pre>
  
  <p>... I get the following error: </p>
  
  <blockquote>
    <p>_linklist.js:65</p>
    
    <p>item._idleNext = list._idleNext;                     </p>
    
    <p>TypeError: Cannot read property '_idleNext' of undefined
        at Object.append (_linklist.js:65:24)
        at Object.active (timers.js:136:9)
        at Socket._writeOut (net.js:461:10)</p>
  </blockquote>
  
  <pre><code>at Socket.write (net.js:378:17)
  at Object.draft76 ([my dir]/npm/node_modules/websocket-server/lib/ws/connection.js:401:28)
  at new Connection ([my dir]npm/node_modules/websocket-server/lib/ws/connection.js:165:22)
  at Server.&lt;anonymous&gt; ([my dir]npm/node_modules/websocket-server/lib/ws/server.js:72:7)
  at Server.emit (events.js:81:20)
  at Socket.&lt;anonymous&gt; (http.js:1034:14)
  at Socket._onReadable (net.js:684:27)
  </code></pre>
  
  <p>It did run for a while (which is weird I guess), and then this message started appearing whenever I tried to connect. I haven't changed anything in the node.js or websocket-server code. A penny to whomever can tell me why this happens!</p>