lib: fix bug when read chunks when read continue after eof