Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
fix: create a copy of the protocol slice in network.processSettings
Browse files Browse the repository at this point in the history
Fixes #584
  • Loading branch information
Jorropo committed Sep 13, 2022
1 parent 7ee3ebf commit 2545a3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network/ipfs_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewFromIpfsHost(host host.Host, r routing.ContentRouting, opts ...NetOpt) B
}

func processSettings(opts ...NetOpt) Settings {
s := Settings{SupportedProtocols: internal.DefaultProtocols}
s := Settings{SupportedProtocols: append([]protocol.ID(nil), internal.DefaultProtocols...)}
for _, opt := range opts {
opt(&s)
}
Expand Down

0 comments on commit 2545a3f

Please sign in to comment.