another attempt at better disconnect logic
This commit is contained in:
parent
769b51dcec
commit
1f7fa20992
|
|
@ -69,8 +69,6 @@ if (!args.serverSocket && !args.serverAddress && !args.serverPort) {
|
|||
const package = require("../package.json");
|
||||
args.version = package.version;
|
||||
|
||||
console.log(args, options);
|
||||
|
||||
//const grpc = require("grpc");
|
||||
const grpc = require("grpc-uds");
|
||||
const protoLoader = require("@grpc/proto-loader");
|
||||
|
|
|
|||
|
|
@ -415,23 +415,24 @@ class ISCSI {
|
|||
if (!Array.isArray(portals)) {
|
||||
portals = [portals];
|
||||
}
|
||||
portals.forEach(p => {
|
||||
iscsi
|
||||
.exec(options.paths.iscsiadm, args.concat(["-p", p, "-u"]))
|
||||
.then(() => {})
|
||||
.catch(err => {
|
||||
if (err.code == 21) {
|
||||
// no matching sessions
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
});
|
||||
for (let i = 0; i < portals.length; i++) {
|
||||
let p = portals[i];
|
||||
try {
|
||||
await iscsi.exec(
|
||||
options.paths.iscsiadm,
|
||||
args.concat(["-p", p, "-u"])
|
||||
);
|
||||
} catch (err) {
|
||||
if (err.code == 21) {
|
||||
// no matching sessions
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
async deleteDBEntry(tgtIQN) {}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue