lib/WiFi.js
function(next) {
      // already connected to service? stop
      if (targetServiceProperties.state === STATES.READY ||
          targetServiceProperties.state === STATES.ONLINE) {
        debug('already connected');
        if (callback) callback();
        _lockJoin = false;
        return;
      } else {
        next();
      }
    }
function(next) {
      // already connected to service? stop
      if (targetServiceProperties.state === STATES.READY ||
          targetServiceProperties.state === STATES.ONLINE) {
        debug('already connected');
        if (callback) callback();
        _lockJoin = false;
        return;
      } else {
        next();
      }
    }
function ( next ) { // already connected to service? stop if ( targetServiceProperties . state === STATES . READY || targetServiceProperties . state === STATES . ONLINE ) { debug ( 'already connected' ) ; if ( callback ) callback ( ) ; _lockJoin = false ; return ; } else { next ( ) ; } }
check current state
check current state