/** * Check if the supplied errors are a result of the port being in use. * * @param {Array} errors Errors received from create-servers * @returns {Boolean} Indication if the port was in use. * @private */ function portInUseError(errors) { if (Array.isArray(errors)) { errors = errors[0]; } return (errors.https || errors.http || {}).errno === 'EADDRINUSE'; }
/** * Check if the supplied errors are a result of the port being in use. * * @param {Array} errors Errors received from create-servers * @returns {Boolean} Indication if the port was in use. * @private */ function portInUseError(errors) { if (Array.isArray(errors)) { errors = errors[0]; } return (errors.https || errors.http || {}).errno === 'EADDRINUSE'; }