Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mq.Close(hObj, 0, function (err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQCLOSE successful");
}
mq.Disc(hConn, function (err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQDISC successful");
}
});
});
}
sleep(3 *1000).then(() => {
mq.Disc(conn, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQDISC successful");
}
});
});
}
mq.Close(hObj, 0, function(err) {
if (err) {
console.log(formatErr(err));
} else {
//console.log("MQCLOSE successful");
}
mq.Disc(hConn, function(err) {
if (err) {
console.log(formatErr(err));
} else {
//console.log("MQDISC successful");
}
});
});
}
mq.Close(hObj, 0, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQCLOSE successful");
}
mq.Disc(hConn, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQDISC successful");
}
});
});
}
mq.Close(hObj, 0, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQCLOSE successful");
}
mq.Disc(hConn, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQDISC successful");
}
});
});
}
mq.Close(hObjPubQ, 0, function(err) {
if (err) {
console.log("MQCLOSE (PubQ) ended with reason " + err.mqrc);
} else {
console.log("MQCLOSE (PubQ) successful");
}
mq.Disc(hConn, function(err) {
if (err) {
console.log("MQDISC ended with reason " + err.mqrc);
} else {
console.log("MQDISC successful");
}
});
});
}
mq.Close(hObj, 0, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQCLOSE successful");
}
mq.Disc(hConn, function(err) {
if (err) {
console.log(formatErr(err));
} else {
console.log("MQDISC successful");
}
});
});
}
mq.Close(hObjPubQ, 0, function(err) {
if (err) {
debug_warn("MQCLOSE (PubQ) ended with reason " + err.mqrc);
} else {
debug_info("MQCLOSE (PubQ) successful");
}
mq.Disc(hConn, function(err) {
if (err) {
debug_warn("MQDISC ended with reason " + err.mqrc);
} else {
debug_info("MQDISC successful");
}
});
});
}
return new Promise(function resolver(resolve, reject){
if (1 == connCount) {
mq.Disc(hConn, function(err) {
if (err) {
debug_warn('Error disconnecting', err);
} else {
debug_info("MQDISC successful");
}
resolve();
});
} else {
resolve();
}
});
}