cleanly handle ZeroReturnError as an expected EOF
correctly check shutdown state before ignoring ZeroReturnError
Merge pull request #520 from bryanhelmig/zero-return-fix

Cleanly handle ZeroReturnError as an expected EOF.