Deal with situation where reading from a stream returns None

It's possible for a stream to fail to read any data but the stream
hasn't closed yet. In this situation the stream will return None.

The solution I have here is to retry reading from the stream