revert addr_factory

This commit is contained in:
Preston Van Loon
2019-03-16 14:21:06 -04:00
parent dedaa40555
commit e93fb70649

View File

@@ -64,7 +64,7 @@ func NewServer(cfg *ServerConfig) (*Server, error) {
ctx, cancel := context.WithCancel(context.Background())
opts := buildOptions(cfg.Port)
if cfg.RelayNodeAddr != "" {
opts = append(opts, libp2p.AddrsFactory(withRelayAddrs(cfg.RelayNodeAddr)))
opts = append(opts, libp2p.AddrsFactory(relayAddrsOnly(cfg.RelayNodeAddr)))
}
if !checkAvailablePort(cfg.Port) {
cancel()