소스 검색

correct magic number

Darien Raymond 7 년 전
부모
커밋
5af3580bcf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      common/crypto/auth.go

+ 1 - 1
common/crypto/auth.go

@@ -124,7 +124,7 @@ func (r *AuthenticationReader) readSize() (int32, error) {
 var errSoft = newError("waiting for more data")
 
 func (r *AuthenticationReader) readInternal(soft bool) (*buf.Buffer, error) {
-	if soft && r.reader.BufferedBytes() < 2 {
+	if soft && r.reader.BufferedBytes() < int32(r.sizeParser.SizeBytes()) {
 		return nil, errSoft
 	}