lib/easyrtc_default_event_listeners.js
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);
        }
    }
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);
        }
    }
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 ) ; } }
This function is called upon completion of the async waterfall, or upon an error being thrown.
This function is called upon completion of the async waterfall or upon an error being thrown .