ghost/bootstrap-socket/lib/bootstrap-socket.js
Function connectAndSend
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.connectAndSend = (socketAddress, message) => {
// Very basic guard against bad calls
if (!socketAddress || !socketAddress.host || !socketAddress.port || !logging || !logging.info || !logging.warn || !message) {
return Promise.resolve();
}
Function connect
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const connect = (options = {}) => {
let wasResolved = false;
const waitTimeout = setTimeout(() => {
logging.info('Bootstrap socket timed out.');
Consider simplifying this complex logical expression. Open
Open
if (!socketAddress || !socketAddress.host || !socketAddress.port || !logging || !logging.info || !logging.warn || !message) {
return Promise.resolve();
}