Fix blocking in agent when logs are streamed.

Bad bug isolated while working on integration tests. Easy fix.