This might help prevent the stream from closing early