Skip to content

Commit

Permalink
read and write timeout support for DoQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondřej Benkovský committed Jul 10, 2023
1 parent 753756f commit ad6008e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion cmd/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ func (b *Benchmark) Run(ctx context.Context) ([]*ResultStats, error) {
if b.useQuic {
h, _, _ := net.SplitHostPort(b.Server)
// nolint:gosec
quicClient, err := doq.NewClient(b.Server, doq.Options{TLSConfig: &tls.Config{ServerName: h, InsecureSkipVerify: b.Insecure}})
quicClient, err := doq.NewClient(b.Server, doq.Options{
TLSConfig: &tls.Config{ServerName: h, InsecureSkipVerify: b.Insecure},
ReadTimeout: b.ReadTimeout,
WriteTimeout: b.WriteTimeout,
})
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/quic-go/quic-go v0.36.1
github.com/stretchr/testify v1.8.4
github.com/tantalor93/doh-go v0.1.0
github.com/tantalor93/doq-go v0.4.0
github.com/tantalor93/doq-go v0.5.0
go-hep.org/x/hep v0.33.0
go.uber.org/ratelimit v0.2.0
golang.org/x/net v0.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tantalor93/doh-go v0.1.0 h1:GpC7qH2ciRFPIpfiFJ0FMmp1Q4dR1zNIhV16+yByciA=
github.com/tantalor93/doh-go v0.1.0/go.mod h1:GvJN2FOEuFGO0STTCbggTgGsAYkL8b04xQY+vf72IV0=
github.com/tantalor93/doq-go v0.4.0 h1:VFp9HS8sqZoGfoHo2X+BceYnU03OGRmY+1zM3N2ZxlE=
github.com/tantalor93/doq-go v0.4.0/go.mod h1:La3/FOfPtW62nZS96wsOoFjKuKf6DE5DokefmzdEXw8=
github.com/tantalor93/doq-go v0.5.0 h1:54bJVR655rE4H2GbJI6vuJ/EeMCmdqY6WPKv2tUcZ2w=
github.com/tantalor93/doq-go v0.5.0/go.mod h1:La3/FOfPtW62nZS96wsOoFjKuKf6DE5DokefmzdEXw8=
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down

0 comments on commit ad6008e

Please sign in to comment.