@@ -36,28 +36,28 @@ function ioSession(options) {
 
       var sessionID = findCookie(socketHandshake);
 
+      if (!sessionID) {
+        return callback();
+      }
+
       sessionStore.load(sessionID, function (err, session) {
         if(err) {
           return callback(err);
         }
 
-        if(!session) {
-          err = new Error('could not look up session by key: ' + key);
-          return callback(err);
-        }
-
-        callback(null, sessionID, session);
+        callback(null, session);
       });
     });
   }
 
   return function handleSession(socket, next) {
-    getSession(socket.request, function (err, sessionID, session) {
+    getSession(socket.request, function (err, session) {
       if(err) {
         return next(err);
       }
-
-      socket.session = session;
+      if (session) {
+        socket.session = session;
+      }
       next();
     });
   };