Skip to content

Commit 8752f80

Browse files
anytlswwqgtxx
authored andcommitted
fix: anytls stream read error (#1970)
Co-authored-by: anytls <anytls>
1 parent a6c0c02 commit 8752f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport/anytls/session/stream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func newStream(id uint32, sess *Session) *Stream {
4040
// Read implements net.Conn
4141
func (s *Stream) Read(b []byte) (n int, err error) {
4242
n, err = s.pipeR.Read(b)
43-
if s.dieErr != nil {
43+
if n == 0 && s.dieErr != nil {
4444
err = s.dieErr
4545
}
4646
return

0 commit comments

Comments
 (0)