Terminate the sequence if stream.EndRead returns zero bytes, so we don't end up with 100% CPU consumption