diff --git a/proxy_local/http2_proxy.go b/proxy_local/http2_proxy.go index 9a5db10..a1ee129 100644 --- a/proxy_local/http2_proxy.go +++ b/proxy_local/http2_proxy.go @@ -239,9 +239,11 @@ func (p *clientConn) MarkDead(conn *http2.ClientConn) { p.lock.Lock() defer p.lock.Unlock() - log.Errorln("mark dead") - p.conn.Close() - p.conn = nil + if p.conn != nil { + log.Errorln("mark dead") + p.conn.Close() + p.conn = nil + } } var debug bool