Explorar o código

Correctly propagate error in AuthenticationReader readBuffer

Shelikhoo hai 1 ano
pai
achega
87affb11a5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      common/crypto/auth.go

+ 1 - 1
common/crypto/auth.go

@@ -181,7 +181,7 @@ func (r *AuthenticationReader) readInternal(soft bool, mb *buf.MultiBuffer) erro
 	if size <= buf.Size {
 		b, err := r.readBuffer(effectiveSize, int32(padding))
 		if err != nil {
-			return nil
+			return err
 		}
 		*mb = append(*mb, b)
 		return nil