stream: Prevent continuous errors upon disconnect

Fixes #4
Merge pull request #5 from bcampbell/master

stream: Prevent continuous errors upon disconnect