Skip to content

Fail Read if objectReader is closed

John Cai requested to merge jc-fix-cache-test into master

A flaky test exposed the issue whereby an object reader can still be read from after it is closed. This is because we are using a buffered reader for reading the data from the command, so there could be some buffered data that is still readable even though the objectReader is closed.

The fix is to check if the objectReader has been closed in the Read function, and if so to return an error immediately.

fixes: #3823 (closed)

Edited by John Cai

Merge request reports