From 1355196b7c07a5d4f3319a2b0a357a8f7972a669 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> 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)