diff --git a/p2p/protocol/ping/ping.go b/p2p/protocol/ping/ping.go index b1f3da4efe..62ecb69849 100644 --- a/p2p/protocol/ping/ping.go +++ b/p2p/protocol/ping/ping.go @@ -84,7 +84,7 @@ func (ps *PingService) Ping(ctx context.Context, p peer.ID) <-chan Result { // Ping pings the remote peer until the context is canceled, returning a stream // of RTTs or errors. func Ping(ctx context.Context, h host.Host, p peer.ID) <-chan Result { - s, err := h.NewStream(ctx, p, ID) + s, err := h.NewStream(network.WithUseTransient(ctx, "ping"), p, ID) if err != nil { ch := make(chan Result, 1) ch <- Result{Error: err}