Skip to content

Commit

Permalink
dial.go: Clarify http.NewRequestWithContext error
Browse files Browse the repository at this point in the history
  • Loading branch information
nhooyr committed Oct 13, 2023
1 parent 693fac9 commit e305027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func handshakeRequest(ctx context.Context, urls string, opts *DialOptions, copts

req, err := http.NewRequestWithContext(ctx, "GET", u.String(), nil)
if err != nil {
return nil, fmt.Errorf("http.NewRequestWithContext failed: %w", err)
return nil, fmt.Errorf("failed to create new http request: %w", err)
}
req.Header = opts.HTTPHeader.Clone()
req.Header.Set("Connection", "Upgrade")
Expand Down

0 comments on commit e305027

Please sign in to comment.