libgitops
libgitops copied to clipboard
`Decoder.DecodeAll(fr)` should ensure that `fr` is closed
Currently if the DecodeAll(fr) call fails to decode some element from the frame reader fr, it returns the error without consuming the rest of the frames and without closing fr. DecodeAll should always ensure that the passed frame reader is closed no matter the result, we also need unit tests to enforce this behavior.