code: function (err) {
          if (err) {
              try{
                  pub.util.sendSocketCallbackMsg(easyrtcid, socketCallback, pub.util.getErrorMsg("LOGIN_GEN_FAIL"), appObj);
                  socket.disconnect();
                  pub.util.logError("["+easyrtcid+"] General authentication error. Socket disconnected.", err);
              }catch(e) {}
          } else {
              callback(null, connectionObj);
          }
      }
docs: This function is called upon completion of the async waterfall, or upon an error being thrown.