Style: cleanup code

This commit is contained in:
Dreamacro
2021-03-24 01:00:21 +08:00
parent 807d53c1e7
commit d759d16944
9 changed files with 40 additions and 50 deletions

View File

@ -90,10 +90,7 @@ func (hc *h2Conn) Close() error {
if err := hc.ClientConn.Shutdown(hc.res.Request.Context()); err != nil {
return err
}
if err := hc.Conn.Close(); err != nil {
return err
}
return nil
return hc.Conn.Close()
}
func StreamH2Conn(conn net.Conn, cfg *H2Config) (net.Conn, error) {