[enh] better name for target in mails/logs
This commit is contained in:
@@ -14,6 +14,7 @@ export function ws2pWatcher(conf: Conf) {
|
||||
|
||||
const keys = await Scrypt(wserver.salt, wserver.passwd)
|
||||
const keypair = new Key(keys.pub, keys.sec)
|
||||
const target = `${wserver.address} (${wserver.expectedPubkey.substr(0, 8)})`
|
||||
|
||||
await watcherLoop(
|
||||
async () => {
|
||||
@@ -42,18 +43,18 @@ export function ws2pWatcher(conf: Conf) {
|
||||
|
||||
conf.reconnectionDelays,
|
||||
|
||||
mail.onEstablished(conf, wserver.expectedPubkey),
|
||||
mail.onEstablished(conf, target),
|
||||
|
||||
// When a disconnection is detected
|
||||
mail.onDisconnect(conf, wserver.expectedPubkey),
|
||||
mail.onDisconnect(conf, target),
|
||||
|
||||
async () => {
|
||||
console.log('Trying to connect to %s', wserver.expectedPubkey)
|
||||
console.log('Trying to connect to %s', target)
|
||||
},
|
||||
|
||||
mail.onRestartSuccess(conf, wserver.expectedPubkey),
|
||||
mail.onRestartSuccess(conf, target),
|
||||
|
||||
mail.onError(conf, wserver.expectedPubkey)
|
||||
mail.onError(conf, target)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user