diff --git a/h2mux/h2_dictionaries.go b/h2mux/h2_dictionaries.go index bd091894..bf92d58d 100644 --- a/h2mux/h2_dictionaries.go +++ b/h2mux/h2_dictionaries.go @@ -542,7 +542,10 @@ func (w *h2DictWriter) Write(p []byte) (n int, err error) { } func (w *h2DictWriter) Close() error { - return w.comp.Close() + if w.comp != nil { + return w.comp.Close() + } + return nil } // From http2/hpack