mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-01-14 02:20:06 +08:00
Update network/context.go
Co-authored-by: Yusef Napora <yusef@protocol.ai>
This commit is contained in:
parent
8e949a777f
commit
ac2ecf385a
@ -69,7 +69,7 @@ func WithDialPeerTimeout(ctx context.Context, timeout time.Duration) context.Con
|
||||
return context.WithValue(ctx, dialPeerTimeoutCtxKey{}, timeout)
|
||||
}
|
||||
|
||||
// WithUseTransient constructs a new context with an option that instructs to network
|
||||
// WithUseTransient constructs a new context with an option that instructs the network
|
||||
// that it is acceptable to use a transient connection when opening a new stream.
|
||||
func WithUseTransient(ctx context.Context) context.Context {
|
||||
return context.WithValue(ctx, useTransient, true)
|
||||
|
Loading…
Reference in New Issue
Block a user