fixed incorrect behavior when loopback or tunnel initially fails
This commit is contained in:
parent
c697008573
commit
9a63f30bf2
|
@ -130,8 +130,6 @@ module.exports.create = function (deps, conf) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
localAddr = addr;
|
|
||||||
gateway = gw;
|
|
||||||
var loopResult = await loopback(loopbackDomain);
|
var loopResult = await loopback(loopbackDomain);
|
||||||
var notLooped = Object.keys(loopResult.ports).filter(function (port) {
|
var notLooped = Object.keys(loopResult.ports).filter(function (port) {
|
||||||
return !loopResult.ports[port];
|
return !loopResult.ports[port];
|
||||||
|
@ -153,6 +151,13 @@ module.exports.create = function (deps, conf) {
|
||||||
await connectAllTunnels();
|
await connectAllTunnels();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't assign these until the end of the function. This means that if something failed
|
||||||
|
// in the loopback or tunnel connection that we will try to go through the whole process
|
||||||
|
// again next time and hopefully the error is temporary (but if not I'm not sure what the
|
||||||
|
// correct course of action would be anyway).
|
||||||
|
localAddr = addr;
|
||||||
|
gateway = gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
var publicAddress;
|
var publicAddress;
|
||||||
|
|
Loading…
Reference in New Issue