Stop stream when eof reached