Exit subscribe loop on error

Fixes a panic when we end up closing the out channel twice.
Merge pull request #5 from jobi/fix-double-close

Exit subscribe loop on error