diff --git a/options.go b/options.go index 4bdaefb..16d25f1 100644 --- a/options.go +++ b/options.go @@ -10,8 +10,8 @@ var noDial = noDialCtxKey{} // WithNoDial constructs a new context with an option that instructs the network // to not attempt a new dial when opening a stream. -func WithNoDial(ctx context.Context, reason string) { - context.WithValue(ctx, noDial, reason) +func WithNoDial(ctx context.Context, reason string) context.Context { + return context.WithValue(ctx, noDial, reason) } // GetNoDial returns true if the no dial option is set in the context.