Fix channel leak and simplify code.

Fixes a channel leak seen in a consumer. Simplify the HasEmptyField
function.
Merge pull request #1 from pkwarren/leak

Fix channel leak and simplify code.