소스 검색

Prevent Read on a closed stream

Armon Dadgar 10 년 전
부모
커밋
912e29616f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      stream.go

+ 2 - 0
stream.go

@@ -86,6 +86,8 @@ func (s *Stream) Read(b []byte) (n int, err error) {
 START:
 	s.stateLock.Lock()
 	switch s.state {
+	case streamLocalClose:
+		fallthrough
 	case streamRemoteClose:
 		fallthrough
 	case streamClosed: