diff --git a/component/gun/gun.go b/component/gun/gun.go index 4d2b8fd1..0da84a0d 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)