another attempt at better disconnect logic

This commit is contained in:
Travis Glenn Hansen 2019-11-23 02:08:17 -07:00
parent 769b51dcec
commit 1f7fa20992
2 changed files with 16 additions and 17 deletions

View File

@ -69,8 +69,6 @@ if (!args.serverSocket && !args.serverAddress && !args.serverPort) {
const package = require("../package.json"); const package = require("../package.json");
args.version = package.version; args.version = package.version;
console.log(args, options);
//const grpc = require("grpc"); //const grpc = require("grpc");
const grpc = require("grpc-uds"); const grpc = require("grpc-uds");
const protoLoader = require("@grpc/proto-loader"); const protoLoader = require("@grpc/proto-loader");

View File

@ -415,23 +415,24 @@ class ISCSI {
if (!Array.isArray(portals)) { if (!Array.isArray(portals)) {
portals = [portals]; portals = [portals];
} }
portals.forEach(p => { for (let i = 0; i < portals.length; i++) {
iscsi let p = portals[i];
.exec(options.paths.iscsiadm, args.concat(["-p", p, "-u"])) try {
.then(() => {}) await iscsi.exec(
.catch(err => { options.paths.iscsiadm,
if (err.code == 21) { args.concat(["-p", p, "-u"])
// no matching sessions );
} else { } catch (err) {
throw err; if (err.code == 21) {
} // no matching sessions
}); } else {
}); throw err;
}
}
}
return true; return true;
}, }
async deleteDBEntry(tgtIQN) {}
}; };
} }