fix: anytls stream read error (#1970)

Co-authored-by: anytls <anytls>
This commit is contained in:
anytlsandanytls authored and wwqgtxx committed 2025-04-09 18:02:12 +08:00
1 parent a6c0c02e0d
commit 8752f80595
1 file changed
+1 -1
+1 -1
View File
@@ -40,7 +40,7 @@ func newStream(id uint32, sess *Session) *Stream {
// Read implements net.Conn
func (s *Stream) Read(b []byte) (n int, err error) {
n, err = s.pipeR.Read(b)
if s.dieErr != nil {
if n == 0 && s.dieErr != nil {
err = s.dieErr
}
return