Add info log line in case of no external IP (#313)

This commit is contained in:
Kim De Mey 2020-11-26 18:19:13 +01:00 committed by GitHub
parent 114680453f
commit b88fef203b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -798,6 +798,9 @@ proc newProtocol*(privKey: PrivateKey,
proc open*(d: Protocol) {.raises: [Exception, Defect].} = proc open*(d: Protocol) {.raises: [Exception, Defect].} =
info "Starting discovery node", node = d.localNode, info "Starting discovery node", node = d.localNode,
bindAddress = d.bindAddress, uri = toURI(d.localNode.record) bindAddress = d.bindAddress, uri = toURI(d.localNode.record)
if d.localNode.address.isNone():
info "No external IP provided, this node will not be discoverable"
# TODO allow binding to specific IP / IPv6 / etc # TODO allow binding to specific IP / IPv6 / etc
let ta = initTAddress(d.bindAddress.ip, d.bindAddress.port) let ta = initTAddress(d.bindAddress.ip, d.bindAddress.port)
# TODO: raises `OSError` and `IOSelectorsException`, the latter which is # TODO: raises `OSError` and `IOSelectorsException`, the latter which is