Skip to content

Commit

Permalink
fix: enable identify service all the time (#1440)
Browse files Browse the repository at this point in the history
We only enable identify if stream muxers are configured, but new transports can be their own muxers so just enable it all the time.
  • Loading branch information
achingbrain committed Oct 17, 2022
1 parent f4b1f54 commit 931e042
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/libp2p.ts
Expand Up @@ -165,14 +165,11 @@ export class Libp2pNode extends EventEmitter<Libp2pEvents> implements Libp2p {
this.components.transportManager.add(this.configureComponent(fn(this.components)))
})

// Attach stream multiplexers
if (init.streamMuxers != null && init.streamMuxers.length > 0) {
// Add the identify service since we can multiplex
this.identifyService = new IdentifyService(this.components, {
...init.identify
})
this.configureComponent(this.identifyService)
}
// Add the identify service
this.identifyService = new IdentifyService(this.components, {
...init.identify
})
this.configureComponent(this.identifyService)

// dht provided components (peerRouting, contentRouting, dht)
if (init.dht != null) {
Expand Down

0 comments on commit 931e042

Please sign in to comment.