libgitops icon indicating copy to clipboard operation
libgitops copied to clipboard

`Decoder.DecodeAll(fr)` should ensure that `fr` is closed

Open twelho opened this issue 5 years ago • 0 comments

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.

twelho avatar Aug 03 '20 12:08 twelho