mqlight.js
function(err) {
          logger.entry('Client._tryService.connError', _id);

          err = lookupError(err);
          logger.log('data', _id, 'failed to connect to: ' + logUrl +
                     ' due to error: ' + util.inspect(err));

          // This service failed to connect. Try the next one.
          // XXX: wrap in shouldReconnect ?
          tryNextService(err);

          logger.exit('Client._tryService.connError', _id, null);
        }
function(err) {
          logger.entry('Client._tryService.connError', _id);

          err = lookupError(err);
          logger.log('data', _id, 'failed to connect to: ' + logUrl +
                     ' due to error: ' + util.inspect(err));

          // This service failed to connect. Try the next one.
          // XXX: wrap in shouldReconnect ?
          tryNextService(err);

          logger.exit('Client._tryService.connError', _id, null);
        }
function ( err ) { logger . entry ( 'Client._tryService.connError' , _id ) ; err = lookupError ( err ) ; logger . log ( 'data' , _id , 'failed to connect to: ' + logUrl + ' due to error: ' + util . inspect ( err ) ) ; // This service failed to connect. Try the next one. // XXX: wrap in shouldReconnect ? tryNextService ( err ) ; logger . exit ( 'Client._tryService.connError' , _id , null ) ; }
Define an error handler for connection errors. Log the failure and then try the next service.
Define an error handler for connection errors . Log the failure and then try the next service .