Skip to content

Commit

Permalink
change default msgSenderBuilder for config one
Browse files Browse the repository at this point in the history
  • Loading branch information
cortze committed Oct 2, 2024
1 parent 53ef5be commit 0b803b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"github.com/libp2p/go-libp2p-kad-dht/internal"
dhtcfg "github.com/libp2p/go-libp2p-kad-dht/internal/config"
"github.com/libp2p/go-libp2p-kad-dht/internal/net"
"github.com/libp2p/go-libp2p-kad-dht/metrics"
"github.com/libp2p/go-libp2p-kad-dht/netsize"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
Expand Down Expand Up @@ -206,7 +205,7 @@ func New(ctx context.Context, h host.Host, options ...Option) (*IpfsDHT, error)
dht.disableFixLowPeers = cfg.DisableFixLowPeers

dht.Validator = cfg.Validator
dht.msgSender = net.NewMessageSenderImpl(h, dht.protocols)
dht.msgSender = cfg.MsgSenderBuilder(h, dht.protocols)
dht.protoMessenger, err = pb.NewProtocolMessenger(dht.msgSender)
if err != nil {
return nil, err
Expand Down

0 comments on commit 0b803b9

Please sign in to comment.