chore: apply suggestions from code review

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
This commit is contained in:
Vasco Santos
2020-10-05 16:49:43 +02:00
committed by Vasco Santos
parent 11a46ea71e
commit ee23fb9508
4 changed files with 8 additions and 7 deletions

View File

@ -68,12 +68,12 @@ class Relay {
await this._libp2p.contentRouting.provide(cid)
} catch (err) {
if (err.code === 'NO_ROUTERS_AVAILABLE') {
log('there are no routers configured to advertise hop relay service')
log.error('a content router, such as a DHT, must be provided in order to advertise the relay service', err)
// Stop the advertise
this.stop()
} else {
log.error(err)
}
// Stop the advertise
this.stop()
return
}

View File

@ -63,7 +63,7 @@ const DefaultConfig = {
enabled: true,
advertise: {
bootDelay: RelayConstants.ADVERTISE_BOOT_DELAY,
enabled: true,
enabled: false,
ttl: RelayConstants.ADVERTISE_TTL
},
hop: {