diff --git a/default_dial_option_server_option_test.go b/default_dial_option_server_option_test.go index d75376247732..c246199229cf 100644 --- a/default_dial_option_server_option_test.go +++ b/default_dial_option_server_option_test.go @@ -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) } } diff --git a/server.go b/server.go index d00190826ec6..836caa62fda5 100644 --- a/server.go +++ b/server.go @@ -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, } }