From 5842c94b17d1d5951dbc8f0aac5a35453c09e9df Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 18 Mar 2021 23:19:00 +0800 Subject: [PATCH] Fix: grpc connection panic --- component/gun/gun.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/component/gun/gun.go b/component/gun/gun.go index 4d2b8fd14..0da84a0dc 100644 --- a/component/gun/gun.go +++ b/component/gun/gun.go @@ -81,6 +81,8 @@ func (g *Conn) Read(b []byte) (n int, err error) { g.buf = nil } return + } else if g.response == nil { + return 0, net.ErrClosed } buf := make([]byte, 5)