Skip to content

Commit

Permalink
MaxHeaderListSize return value instead of pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouyihaiDing committed Mar 20, 2024
1 parent 829d4fe commit aa603cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion default_dial_option_server_option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (s) TestHeaderListSizeDialOptionServerOption(t *testing.T) {
t.Fatalf("Unexpected s.opts.MaxHeaderListSizeDialOption.MaxHeaderListSize: %d != %d", clientHeaderListSize, maxHeaderListSize)
}
serverHeaderListSize := MaxHeaderListSize(maxHeaderListSize)
if serverHeaderListSize.(*MaxHeaderListSizeServerOption).MaxHeaderListSize != maxHeaderListSize {
if serverHeaderListSize.(MaxHeaderListSizeServerOption).MaxHeaderListSize != maxHeaderListSize {
t.Fatalf("Unexpected s.opts.MaxHeaderListSizeDialOption.MaxHeaderListSize: %d != %d", serverHeaderListSize, maxHeaderListSize)
}
}
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ func (o MaxHeaderListSizeServerOption) apply(so *serverOptions) {
// MaxHeaderListSize returns a ServerOption that sets the max (uncompressed) size
// of header list that the server is prepared to accept.
func MaxHeaderListSize(s uint32) ServerOption {
return &MaxHeaderListSizeServerOption{
return MaxHeaderListSizeServerOption{
MaxHeaderListSize: s,
}
}
Expand Down

0 comments on commit aa603cd

Please sign in to comment.