Deal with the situation where can't read from the stream but stream is still open