Update network/context.go

Co-authored-by: Yusef Napora <yusef@protocol.ai>
This commit is contained in:
vyzo 2021-02-04 00:18:42 +02:00
parent 8e949a777f
commit ac2ecf385a

View File

@ -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)