Explorar o código

fix auth reader

Darien Raymond %!s(int64=9) %!d(string=hai) anos
pai
achega
8ced9aeec8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      common/crypto/auth.go

+ 1 - 1
common/crypto/auth.go

@@ -159,7 +159,7 @@ func (v *AuthenticationReader) Read(b []byte) (int, error) {
 	}
 
 	totalBytes := v.CopyChunk(b)
-	for v.aggressive {
+	for v.aggressive && totalBytes < len(b) {
 		if err := v.NextChunk(); err != nil {
 			break
 		}